-
Notifications
You must be signed in to change notification settings - Fork 7
/
Button.tsx
37 lines (30 loc) · 900 Bytes
/
Button.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// import React from 'react';
// import { Box, system } from '@marigold/system';
// type ButtonProps = {};
// export const Button = system<ButtonProps, 'button'>(
// ({ variant = 'primary.large', children, ...props }) => {
// return (
// <Box as="button" themeSection="button" variant={variant} {...props}>
// <span style={{ display: 'inline-flex', alignItems: 'center' }}>
// {children}
// </span>
// </Box>
// );
// }
// );
import React from 'react';
import { createStyles } from '@marigold/system';
const buttonStyles = createStyles('form', {
bg: '#f98e28',
});
type ButtonProps = React.PropsWithChildren<{
size: string[];
}>;
export const Button = ({ size, children, ...props }: ButtonProps) => {
const classNames = buttonStyles(size);
return (
<button className={classNames} {...props}>
{children}
</button>
);
};