UNPKG

borderless

Version:

Componentes da Borderless

29 lines (28 loc) 1.34 kB
import { jsx as _jsx } from "react/jsx-runtime"; export const Button = ({ onClick, children, className = "", width, height, isFull = false, color = "#fff", backgroundColor = "#000", gradient, directionGradient = "to right", borderRadius = "8px", borderWidth = "0", borderColor = "transparent", fontSize = "1rem", fontWeight = "500", shadow = true, disabled = false, }) => { const computedBackground = gradient ? `linear-gradient(${directionGradient}, ${gradient[0]}, ${gradient[1]})` : backgroundColor; return (_jsx("button", { onClick: onClick, disabled: disabled, className: className, style: { display: "inline-flex", alignItems: "center", justifyContent: "center", width: isFull ? "100%" : width, height, background: computedBackground, color, fontSize, fontWeight, borderRadius, borderWidth, borderColor, borderStyle: "solid", padding: "0.75rem 1.25rem", cursor: disabled ? "not-allowed" : "pointer", opacity: disabled ? 0.6 : 1, boxShadow: shadow ? "0 4px 12px rgba(0, 0, 0, 0.1)" : "none", transition: "all 0.2s ease-in-out", }, children: children })); };