From 46f3abcb23ac6cd48281b8a9dea905a955ac845e Mon Sep 17 00:00:00 2001 From: Steffen Waterkamp Date: Tue, 18 Sep 2018 16:42:18 +0200 Subject: [PATCH] Re-introduce setting width for Table Was erroneously removed in #a1ef158 --- gsa/src/web/components/table/table.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/gsa/src/web/components/table/table.js b/gsa/src/web/components/table/table.js index 5a083e3c0f..8b1b49c5a8 100644 --- a/gsa/src/web/components/table/table.js +++ b/gsa/src/web/components/table/table.js @@ -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; };