mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-19 23:31:21 +02:00
Theme system refactor (#31)
This commit is contained in:
@@ -4,19 +4,18 @@ import type { ReactNode } from 'react';
|
||||
interface Props {
|
||||
children: ReactNode;
|
||||
className?: string;
|
||||
color?: 'danger' | 'warning' | 'success' | 'gray';
|
||||
color?: 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
|
||||
}
|
||||
export function Banner({ children, className, color = 'gray' }: Props) {
|
||||
|
||||
export function Banner({ children, className, color = 'secondary' }: Props) {
|
||||
return (
|
||||
<div>
|
||||
<div
|
||||
className={classNames(
|
||||
className,
|
||||
`x-theme-banner--${color}`,
|
||||
'border border-dashed italic px-3 py-2 rounded select-auto cursor-text',
|
||||
color === 'gray' && 'border-gray-500/60 bg-gray-300/10 text-gray-800',
|
||||
color === 'warning' && 'border-orange-500/60 bg-orange-300/10 text-orange-800',
|
||||
color === 'danger' && 'border-red-500/60 bg-red-300/10 text-red-800',
|
||||
color === 'success' && 'border-violet-500/60 bg-violet-300/10 text-violet-800',
|
||||
'border-background-highlight bg-background-highlight-secondary text-fg',
|
||||
)}
|
||||
>
|
||||
{children}
|
||||
|
||||
Reference in New Issue
Block a user