Migrate util, types, state, sticker-creator to ESLint

This commit is contained in:
Sidney Keese
2020-09-14 14:56:35 -07:00
committed by Josh Perez
parent 372aa44e49
commit 2ade4acd52
115 changed files with 647 additions and 448 deletions

View File

@@ -3,10 +3,8 @@ 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) => {
@@ -25,12 +23,15 @@ const getClassName = ({ primary, pill }: Props) => {
return styles.base;
};
export const Button = (props: Props) => {
const { className, pill, primary, children, ...otherProps } = props;
export const Button: React.ComponentType<Props> = ({
className,
children,
...otherProps
}) => {
return (
<button
className={classnames(getClassName(props), className)}
type="button"
className={classnames(getClassName(otherProps), className)}
{...otherProps}
>
{children}