UNPKG

@daimo/pay

Version:

Seamless crypto payments. Onboard users from any chain, any coin into your app with one click.

26 lines (23 loc) 974 B
import { jsx } from 'react/jsx-runtime'; import { Container } from './styles.js'; export { ThemeContainer } from './styles.js'; import useMeasure from 'react-use-measure'; const ThemedButton = ({ children, variant = "primary", autoSize = true, duration = 0.3, style, }) => { const [contentRef, bounds] = useMeasure(); return (jsx(Container, { className: variant, initial: false, animate: autoSize ? { width: bounds.width > 10 ? bounds.width : "auto", } : undefined, transition: { duration: duration, ease: [0.25, 1, 0.5, 1], delay: 0.01, }, style: style, children: jsx("div", { ref: contentRef, style: { whiteSpace: "nowrap", width: "fit-content", position: "relative", padding: "0 12px", }, children: children }) })); }; export { ThemedButton as default }; //# sourceMappingURL=index.js.map