Files
ncd-fe/packages/pl-fe/src/components/ui/banner.tsx
marcin mikołajczak 5537563644 pl-fe: Exports cleanup
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-10-19 00:53:07 +02:00

26 lines
735 B
TypeScript

import clsx from 'clsx';
import React from 'react';
interface IBanner {
theme: 'frosted' | 'opaque';
children: React.ReactNode;
className?: string;
}
/** Displays a sticky full-width banner at the bottom of the screen. */
const Banner: React.FC<IBanner> = ({ theme, children, className }) => (
<div
data-testid='banner'
className={clsx('fixed inset-x-0 bottom-0 z-50 py-8', {
'backdrop-blur bg-primary-800/80 dark:bg-primary-900/80': theme === 'frosted',
'bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 shadow-3xl dark:shadow-inset': theme === 'opaque',
}, className)}
>
<div className='mx-auto max-w-4xl px-4'>
{children}
</div>
</div>
);
export { Banner as default };