diff --git a/striker-ui/components/molecules/List.tsx b/striker-ui/components/molecules/List.tsx index ea45c11d..a12fcde9 100644 --- a/striker-ui/components/molecules/List.tsx +++ b/striker-ui/components/molecules/List.tsx @@ -2,22 +2,57 @@ import { FunctionComponent } from 'react'; import styled from 'styled-components'; import DEFAULT_THEME from '../../lib/consts/DEFAULT_THEME'; - -type ListProps = { - isAlignHorizontal?: boolean; -}; +import Label from '../atoms/Label'; const StyledList = styled.div` display: flex; + flex-direction: ${(props) => (props.isAlignHorizontal ? 'row' : 'column')}; + + border-style: solid; + border-color: ${(props) => props.theme.colors.tertiary}; + + border-width: 0 1px 1px 1px; + + > * { + display: flex; + + align-items: center; + + color: ${(props) => props.theme.colors.tertiary}; + + border-style: solid; + border-color: ${(props) => props.theme.colors.tertiary}; + + border-width: 1px 0 0 0; + + padding: 1em; + } +`; + +const StyledListContainer = styled.div` + > :first-child { + margin-bottom: 1em; + + padding-left: 0; + } `; StyledList.defaultProps = { theme: DEFAULT_THEME, }; -const List: FunctionComponent = ({ children }) => { - return {children}; +StyledListContainer.defaultProps = { + theme: DEFAULT_THEME, +}; + +const List: FunctionComponent = ({ labelText, children }) => { + return ( + + {labelText !== undefined && + ); }; export default List; diff --git a/striker-ui/types/ListProps.d.ts b/striker-ui/types/ListProps.d.ts new file mode 100644 index 00000000..16d67ff5 --- /dev/null +++ b/striker-ui/types/ListProps.d.ts @@ -0,0 +1,4 @@ +type ListProps = { + isAlignHorizontal?: boolean; + labelText?: string; +};