Spaces:
Sleeping
Sleeping
File size: 841 Bytes
dd10606 35f4179 dd10606 35f4179 dd10606 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
import { Button } from "@mantine/core";
const DEFAULT_COLORS =
"bg-indigo-700 text-indigo-100 hover:text-indigo-50 hover:bg-indigo-600";
const DEFAULT_ICON_COLORS = "text-indigo-300 group-hover:text-indigo-200";
const RED_COLORS =
"bg-rose-700 text-rose-100 hover:text-rose-50 hover:bg-rose-600";
const RED_ICON_COLORS = "text-rose-300 group-hover:text-rose-200";
export const TrayButton = ({ Icon, red = false, children, ...other }) => (
<Button
size="md"
radius="xl"
className={`group transition-colors duration-300 ${
red ? RED_COLORS : DEFAULT_COLORS
}`}
leftSection={
<Icon
size={20}
stroke={2}
className={`${
red ? RED_ICON_COLORS : DEFAULT_ICON_COLORS
} transition-colors duration-300`}
/>
}
{...other}
>
{children}
</Button>
);
|