Sticker Creator

This commit is contained in:
Ken Powers
2019-12-17 15:25:57 -05:00
committed by Scott Nonnenberg
parent 2df1ba6e61
commit 11d47a8eb9
123 changed files with 11287 additions and 1714 deletions

View File

@@ -0,0 +1,39 @@
import * as React from 'react';
import * as classnames from 'classnames';
import * as styles from './Button.scss';
export type Props = React.HTMLProps<HTMLButtonElement> & {
className?: string;
pill?: boolean;
primary?: boolean;
children: React.ReactNode;
};
const getClassName = ({ primary, pill }: Props) => {
if (pill && primary) {
return styles.pillPrimary;
}
if (pill) {
return styles.pill;
}
if (primary) {
return styles.primary;
}
return styles.base;
};
export const Button = (props: Props) => {
const { className, pill, primary, children, ...otherProps } = props;
return (
<button
className={classnames(getClassName(props), className)}
{...otherProps}
>
{children}
</button>
);
};