You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
672 B
35 lines
672 B
import styled from "styled-components"; |
|
// lib |
|
import * as styles from "lib/styles/styles"; |
|
|
|
const DropdownItem = ({ value, onClick }: Props) => { |
|
const text = value === "Sans" ? "Sans" : value; |
|
|
|
return <Container onClick={onClick}>{text}</Container>; |
|
}; |
|
|
|
const Container = styled.button` |
|
width: 100%; |
|
height: 40px; |
|
box-sizing: border-box; |
|
padding: 0 16px; |
|
transition: 0.1s ${styles.transition}; |
|
font-size: 14px; |
|
line-height: 40px; |
|
cursor: pointer; |
|
|
|
text-align: left; |
|
outline: none; |
|
|
|
&:focus, |
|
&:hover { |
|
background-color: rgba(0, 0, 0, 0.05); |
|
} |
|
`; |
|
|
|
interface Props { |
|
value: string; |
|
onClick: () => void; |
|
} |
|
|
|
export default DropdownItem;
|
|
|