Skip to content

Commit

Permalink
Allow to wrap HorizontalSep
Browse files Browse the repository at this point in the history
  • Loading branch information
swaterkamp committed Jun 4, 2021
1 parent a6c8b7b commit 6bf8ea8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gsa/src/web/components/layout/horizontalsep.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@
*/
import styled from 'styled-components';

import {isDefined} from 'gmp/utils/identity';

import PropTypes from 'web/utils/proptypes';

import Divider from './divider';

const HorizontalSep = styled(Divider)`
flex-wrap: ${props => (isDefined(props.wrap) ? props.wrap : null)};
& > *:not(:last-child)::after {
content: ${({separator = '•'}) => `'${separator}'`};
margin-left: ${({spacing = '5px'}) => spacing};
Expand All @@ -31,6 +34,7 @@ const HorizontalSep = styled(Divider)`
HorizontalSep.propTypes = {
separator: PropTypes.string,
spacing: PropTypes.string,
wrap: PropTypes.oneOf([true, 'wrap', 'nowrap']),
};

export default HorizontalSep;

0 comments on commit 6bf8ea8

Please sign in to comment.