mirror of
https://github.com/rjNemo/react_template
synced 2026-06-06 06:26:41 +00:00
21 lines
494 B
TypeScript
21 lines
494 B
TypeScript
import styled, { css } from 'styled-components';
|
|
|
|
type ButtonProps = {
|
|
readonly primary: boolean;
|
|
};
|
|
|
|
export const Button = styled.button<ButtonProps>`
|
|
background: transparent;
|
|
border-radius: 3px;
|
|
border: 2px solid ${(props) => props.theme.colors.primary};
|
|
color: ${(props) => props.theme.colors.primary};
|
|
margin: 0 1em;
|
|
padding: 0 0.25em 1em;
|
|
|
|
${(props) =>
|
|
props.primary &&
|
|
css`
|
|
background: ${(props) => props.theme.colors.primary};
|
|
color: white;
|
|
`}
|
|
`;
|