@pushchain/ui-kit
Version:
Push Chain is a true universal L1 that is 100% EVM compatible. It allows developers to deploy once and make their apps instantly compatible with users from all other L1s (Ethereum, Solana, etc) with zero on-chain code change.
36 lines (35 loc) • 1.66 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Button = void 0;
const tslib_1 = require("tslib");
const jsx_runtime_1 = require("react/jsx-runtime");
const react_1 = require("react");
const styled_components_1 = tslib_1.__importDefault(require("styled-components"));
const StyledButton = styled_components_1.default.button `
/* Common Button CSS */
align-items: center;
cursor: ${({ $disabled }) => ($disabled ? 'not-allowed' : 'pointer')};
background: ${({ $bgColor }) => ($bgColor ? $bgColor : '#d548ec')};
color: ${({ $textColor }) => $textColor ? $textColor : 'rgba(255, 255, 255, 1)'};
display: flex;
font-family: var(--pw-int-font-family);
justify-content: center;
white-space: nowrap;
flex-shrink: 0;
font-size: 16px;
font-style: normal;
font-weight: 500;
line-height: 16px;
padding: ${({ $padding }) => $padding ? $padding : '16px 24px'};
min-width: 100px;
width: inherit;
height: 48px;
gap: ${({ $gap }) => $gap ? $gap : '4px'};
border: none;
border-radius: ${({ $borderRadius }) => $borderRadius ? $borderRadius : '12px'};
white-space: nowrap;
`;
const Button = (0, react_1.forwardRef)(({ disabled, bgColor, textColor, borderRadius, gap, padding, style, children, ...props }, ref) => ((0, jsx_runtime_1.jsx)(StyledButton, { ...(disabled ? { 'aria-disabled': true } : {}), style: style, role: "button", ref: ref, "$bgColor": bgColor, "$textColor": textColor, "$borderRadius": borderRadius, "$gap": gap, "$padding": padding, "$disabled": disabled, ...props, children: children })));
exports.Button = Button;
Button.displayName = 'Button';
//# sourceMappingURL=Button.js.map