Skip to content

Commit

Permalink
Merge pull request #949 from swaterkamp/glamorous2styledcomponents
Browse files Browse the repository at this point in the history
Convert glamorous to styled-components #11
  • Loading branch information
bjoernricks authored Sep 18, 2018
2 parents 63e8533 + 46f3abc commit 7bc2f6a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
4 changes: 2 additions & 2 deletions gsa/src/web/components/dashboard/display/datatable.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ import TableBody from 'web/components/table/body';
import PropTypes from 'web/utils/proptypes';

const Margin = styled.div`
margin: 10,
margin: 10px;
display: flex;
flex-grow: 1,
flex-grow: 1;
overflow-y: auto;
`;

Expand Down
15 changes: 14 additions & 1 deletion gsa/src/web/components/table/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,20 @@ export default styled(Table)`
font-size: 12px;
text-align: left;
table-layout: ${props => props.fixed ? 'fixed' : 'auto'};
${props => {
const {size = 'full'} = props;
if (size === 'auto') {
return {};
}
if (size === 'full') {
return {
width: '100%',
};
}
return {
width: size,
};
}};
@media print {
border-collapse: collapse;
};
Expand Down

0 comments on commit 7bc2f6a

Please sign in to comment.