@daimo/pay
Version:
Seamless crypto payments. Onboard users from any chain, any coin into your app with one click.
47 lines (44 loc) • 1.02 kB
JavaScript
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 /* @__PURE__ */ jsx(
Container,
{
className: variant,
initial: false,
animate: autoSize ? {
width: bounds.width > 10 ? bounds.width : "auto"
} : void 0,
transition: {
duration,
ease: [0.25, 1, 0.5, 1],
delay: 0.01
},
style,
children: /* @__PURE__ */ jsx(
"div",
{
ref: contentRef,
style: {
whiteSpace: "nowrap",
width: "fit-content",
position: "relative",
padding: "0 12px"
},
children
}
)
}
);
};
export { ThemedButton as default };
//# sourceMappingURL=index.js.map