Skip to content

Commit

Permalink
Update styled.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanjtc authored Jun 6, 2024
1 parent 9720a1c commit 2d1321a
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/styled.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import React from 'react';
import styled from '@emotion/styled';

import colors from './colors';
Expand All @@ -7,7 +8,16 @@ export const paraGraphDefaultStyle = {
lineHeight: '20px',
};

const Button = styled.button<{ hideBackground?: boolean }>`
interface ButtonBaseProps
extends React.ButtonHTMLAttributes<HTMLButtonElement> {
type: React.ButtonHTMLAttributes<HTMLButtonElement>['type'];
}

const ButtonBase = ({ type = 'button', ...props }: ButtonBaseProps) => {
return <ButtonBase type={type} {...props} />;
};

const Button = styled(ButtonBase)<{ hideBackground?: boolean }>`
appearance: none;
margin: 0;
border: 0;
Expand All @@ -23,8 +33,6 @@ const Button = styled.button<{ hideBackground?: boolean }>`
}
`;

Button.defaultProps = { type: 'button' };

const CircleButton = styled(Button)`
font-size: 14px;
font-weight: bold;
Expand Down

0 comments on commit 2d1321a

Please sign in to comment.