crabfit/crabfit-frontend/src/components/Button/Button.tsx
2021-06-10 14:01:04 +10:00

16 lines
280 B
TypeScript

import { Pressable } from './buttonStyle';
const Button = ({ href, type = 'button', icon, children, ...props }) => (
<Pressable
type={type}
as={href ? 'a' : 'button'}
href={href}
{...props}
>
{icon}
{children}
</Pressable>
);
export default Button;