import { Button, FluidButtonColorOptions, FluidButtonColors, FluidButtonShapes, FluidButtonSizes, FluidButtonWeights, Form, FulidButtonLoadingOptions, Switch, } from '@fluid-design/fluid-ui'; import { useId, useState } from 'react'; import { IoMdTrash } from 'react-icons/io'; import { MdAddCircle, MdChevronRight, MdInfo, MdSend } from 'react-icons/md'; import { useToast } from '@/lib/useToast'; const colors = [ 'red', 'orange', 'amber', 'yellow', 'lime', 'green', 'emerald', 'teal', 'cyan', 'sky', 'blue', 'indigo', 'violet', 'purple', 'fuchsia', 'pink', 'rose', 'gray', 'slate', 'zinc', 'neutral', 'stone', ]; const ButtonWrap = ({ children }) => { return (
{children}
); }; const ButtonColors = ({ weight = 'normal', size = 'md', shape = 'round', isLoading = false, loadingOptions = { animation: 'spin', text: '', }, }: { weight: keyof FluidButtonWeights; size?: keyof FluidButtonSizes; isLoading?: boolean; shape?: keyof FluidButtonShapes; loadingOptions?: { animation?: keyof FulidButtonLoadingOptions['animation']; text?: string; }; }) => { const id = useId(); const [present] = useToast(); return ( {colors.map((color) => ( ))} ); }; const ButtonWeights = () => { const id = useId(); const weights = ['light', 'normal', 'bold', 'outline', 'clear', 'link']; const [present] = useToast(); return ( {weights.map((weight) => ( ))} ); }; const ButtonSizes = () => { const id = useId(); const sizes = ['xs', 'sm', 'md', 'lg', 'xl']; const [present] = useToast(); return ( {sizes.map((size) => ( ))} ); }; const ButtonStates = () => { const [disabled, setDisabled] = useState(true); const [isLoading, setIsLoading] = useState(true); const [isLoaded, setIsLoaded] = useState(!isLoading); const [present] = useToast(); return (
null} initialValues={{ disabled, isLoading, isLoaded, }} >
); }; const ButtonIconOnly = () => { const [present] = useToast(); return ( ); }; const CustomColors = () => { const [present] = useToast(); return (