From 3079b54d310bc6c83b35e2688c8200ec3be2c770 Mon Sep 17 00:00:00 2001 From: mabashian Date: Thu, 22 Aug 2019 15:34:30 -0400 Subject: [PATCH] Reverts data list toolbar back to 50/50 width on normal lists but maintains full width on lookups. --- .../DataListToolbar/DataListToolbar.jsx | 20 ++++++++--- .../OrganizationNotifications.test.jsx.snap | 36 +++++++++++++------ 2 files changed, 41 insertions(+), 15 deletions(-) diff --git a/awx/ui_next/src/components/DataListToolbar/DataListToolbar.jsx b/awx/ui_next/src/components/DataListToolbar/DataListToolbar.jsx index 7c71ddf2a3..8f8d0ecea6 100644 --- a/awx/ui_next/src/components/DataListToolbar/DataListToolbar.jsx +++ b/awx/ui_next/src/components/DataListToolbar/DataListToolbar.jsx @@ -46,18 +46,28 @@ const ToolbarGroup = styled(PFToolbarGroup)` const ColumnLeft = styled.div` display: flex; - flex-grow: 1; + flex-basis: ${props => (props.fillWidth ? 'auto' : '100%')}; + flex-grow: ${props => (props.fillWidth ? '1' : '0')}; justify-content: flex-start; align-items: center; padding: 10px 0 8px 0; + + @media screen and (min-width: 980px) { + flex-basis: ${props => (props.fillWidth ? 'auto' : '50%')}; + } `; const ColumnRight = styled.div` - flex-grow: 0; display: flex; + flex-basis: ${props => (props.fillWidth ? 'auto' : '100%')}; + flex-grow: 0; justify-content: flex-start; align-items: center; - padding: 10px 0 8px 0; + padding: 8px 0 10px 0; + + @media screen and (min-width: 980px) { + flex-basis: ${props => (props.fillWidth ? 'auto' : '50%')}; + } `; const AdditionalControlsWrapper = styled.div` @@ -94,7 +104,7 @@ class DataListToolbar extends React.Component { return ( - + {showSelectAll && ( @@ -117,7 +127,7 @@ class DataListToolbar extends React.Component { - + initially renders succesfully 1`] = ` _css="" className="pf-l-toolbar DataListToolbar__Toolbar-ajzso8-1 sc-htpNat dnOsXG" > - + initially renders succesfully 1`] = ` forwardedRef={null} >
initially renders succesfully 1`] = `
- + initially renders succesfully 1`] = ` forwardedRef={null} >