UNPKG

analytica-frontend-lib

Version:

Repositório público dos componentes utilizados nas plataformas da Analytica Ensino

46 lines (43 loc) 1.68 kB
import * as react_jsx_runtime from 'react/jsx-runtime'; import { ReactNode, ButtonHTMLAttributes } from 'react'; /** * Button component props interface */ type ButtonProps = { /** Content to be displayed inside the button */ children: ReactNode; /** Ícone à esquerda do texto */ iconLeft?: ReactNode; /** Ícone à direita do texto */ iconRight?: ReactNode; /** Size of the button */ size?: 'extra-small' | 'small' | 'medium' | 'large' | 'extra-large'; /** Visual variant of the button */ variant?: 'solid' | 'outline' | 'link'; /** Action type of the button */ action?: 'primary' | 'positive' | 'negative'; /** Additional CSS classes to apply */ className?: string; } & ButtonHTMLAttributes<HTMLButtonElement>; /** * Button component for Analytica Ensino platforms * * A flexible button component with multiple variants, sizes and actions. * * @param children - The content to display inside the button * @param size - The size variant (extra-small, small, medium, large, extra-large) * @param variant - The visual style variant (solid, outline, link) * @param action - The action type (primary, positive, negative) * @param className - Additional CSS classes * @param props - All other standard button HTML attributes * @returns A styled button element * * @example * ```tsx * <Button variant="solid" action="primary" size="medium" onClick={() => console.log('clicked')}> * Click me * </Button> * ``` */ declare const Button: ({ children, iconLeft, iconRight, size, variant, action, className, disabled, type, ...props }: ButtonProps) => react_jsx_runtime.JSX.Element; export { Button as default };