zepio/app/components/divider.js

20 lines
501 B
JavaScript
Raw Normal View History

2018-12-20 06:10:03 -08:00
// @flow
2019-02-04 20:41:45 -08:00
2018-12-20 06:10:03 -08:00
import styled from 'styled-components';
type Props = PropsWithTheme<{
color: ?string,
opacity: number,
marginBottom: string,
marginTop: string,
}>;
2018-12-20 06:10:03 -08:00
export const Divider = styled.div`
width: 100%;
height: 1px;
background-color: ${(props: Props) => props.color || props.theme.colors.text};
opacity: ${(props: Props) => String(props.opacity || 1)};
margin-bottom: ${(props: Props) => props.marginBottom || '0'};
margin-top: ${(props: Props) => props.marginTop || '0'};
2018-12-20 06:10:03 -08:00
`;