parent
0b2c9d4e35
commit
18bf5fbd62
3 changed files with 72 additions and 5 deletions
@ -0,0 +1,23 @@ |
||||
import { FunctionComponent } from 'react'; |
||||
import styled from 'styled-components'; |
||||
|
||||
import DEFAULT_THEME from '../../lib/consts/DEFAULT_THEME'; |
||||
|
||||
type LabelProps = { |
||||
text: string; |
||||
}; |
||||
|
||||
const StyledLabel = styled.span` |
||||
font-size: 1em; |
||||
color: ${(props) => props.theme.colors.primary}; |
||||
`;
|
||||
|
||||
StyledLabel.defaultProps = { |
||||
theme: DEFAULT_THEME, |
||||
}; |
||||
|
||||
const Label: FunctionComponent<LabelProps> = ({ text }) => { |
||||
return <StyledLabel>{text}</StyledLabel>; |
||||
}; |
||||
|
||||
export default Label; |
@ -0,0 +1,23 @@ |
||||
import { FunctionComponent } from 'react'; |
||||
import styled from 'styled-components'; |
||||
|
||||
import DEFAULT_THEME from '../../lib/consts/DEFAULT_THEME'; |
||||
|
||||
type ListProps = { |
||||
isAlignHorizontal?: boolean; |
||||
}; |
||||
|
||||
const StyledList = styled.div<ListProps>` |
||||
display: flex; |
||||
flex-direction: ${(props) => (props.isAlignHorizontal ? 'row' : 'column')}; |
||||
`;
|
||||
|
||||
StyledList.defaultProps = { |
||||
theme: DEFAULT_THEME, |
||||
}; |
||||
|
||||
const List: FunctionComponent<ListProps> = ({ children }) => { |
||||
return <StyledList>{children}</StyledList>; |
||||
}; |
||||
|
||||
export default List; |
Loading…
Reference in new issue