mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-01-16 14:06:49 +01:00
26 lines
660 B
TypeScript
26 lines
660 B
TypeScript
import classNames from 'classnames';
|
|
import type { ReactNode } from 'react';
|
|
|
|
interface Props {
|
|
children: ReactNode;
|
|
className?: string;
|
|
color?: 'primary' | 'secondary' | 'success' | 'notice' | 'warning' | 'danger';
|
|
}
|
|
|
|
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',
|
|
'border-background-highlight bg-background-highlight-secondary text-fg',
|
|
)}
|
|
>
|
|
{children}
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|