interface IButton {
margin?: boolean;
width?: string;
justify?: JustifyContentProps;
}
const Button = styled.button<IButton>`
.....
`;
interface ILoadButton extends IButton, DOMAttributes<HTMLButtonElement> {
loading?: boolean;
}
export const LoadButton: FC<ILoadButton> = ({
loading,
children,
...props
}) => (
<Button {...props}>
{loading ? <LoadIcon /> : null}
{children}
</Button>
);