diff --git a/awx/ui_next/src/components/DataListToolbar/DataListToolbar.jsx b/awx/ui_next/src/components/DataListToolbar/DataListToolbar.jsx index d7fb75ab1d..7c71ddf2a3 100644 --- a/awx/ui_next/src/components/DataListToolbar/DataListToolbar.jsx +++ b/awx/ui_next/src/components/DataListToolbar/DataListToolbar.jsx @@ -34,7 +34,7 @@ const AWXToolbar = styled.div` const Toolbar = styled(PFToolbar)` flex-grow: 1; - margin-left: ${props => (props.marginleft ? '0' : '20px')}; + margin-left: 20px; margin-right: 20px; `; @@ -46,23 +46,18 @@ const ToolbarGroup = styled(PFToolbarGroup)` const ColumnLeft = styled.div` display: flex; - flex-basis: 100%; + flex-grow: 1; justify-content: flex-start; align-items: center; padding: 10px 0 8px 0; - - @media screen and (min-width: 980px) { - flex-basis: 50%; - } `; -const ColumnRight = styled(ColumnLeft)` - padding: 8px 0 10px 0; - - @media screen and (min-width: 980px) { - margin-left: 0; - padding: 10px 0 8px 0; - } +const ColumnRight = styled.div` + flex-grow: 0; + display: flex; + justify-content: flex-start; + align-items: center; + padding: 10px 0 8px 0; `; const AdditionalControlsWrapper = styled.div` @@ -83,7 +78,7 @@ class DataListToolbar extends React.Component { showSelectAll, isAllSelected, isCompact, - noLeftMargin, + fillWidth, onSort, onSearch, onCompact, @@ -98,7 +93,7 @@ class DataListToolbar extends React.Component { const showExpandCollapse = onCompact && onExpand; return ( - + {showSelectAll && ( @@ -159,7 +154,7 @@ DataListToolbar.propTypes = { showSelectAll: PropTypes.bool, isAllSelected: PropTypes.bool, isCompact: PropTypes.bool, - noLeftMargin: PropTypes.bool, + fillWidth: PropTypes.bool, onCompact: PropTypes.func, onExpand: PropTypes.func, onSearch: PropTypes.func, @@ -174,7 +169,7 @@ DataListToolbar.defaultProps = { showSelectAll: false, isAllSelected: false, isCompact: false, - noLeftMargin: false, + fillWidth: false, onCompact: null, onExpand: null, onSearch: null, diff --git a/awx/ui_next/src/components/Lookup/Lookup.jsx b/awx/ui_next/src/components/Lookup/Lookup.jsx index 9f08a81ad2..92c72a8856 100644 --- a/awx/ui_next/src/components/Lookup/Lookup.jsx +++ b/awx/ui_next/src/components/Lookup/Lookup.jsx @@ -194,9 +194,7 @@ class Lookup extends React.Component { onSelect={() => this.toggleSelected(item)} /> )} - renderToolbar={props => ( - - )} + renderToolbar={props => } showPageSizeOptions={false} /> {lookupSelectedItems.length > 0 && ( diff --git a/awx/ui_next/src/screens/Organization/OrganizationNotifications/__snapshots__/OrganizationNotifications.test.jsx.snap b/awx/ui_next/src/screens/Organization/OrganizationNotifications/__snapshots__/OrganizationNotifications.test.jsx.snap index 03ce55e487..dd84655a06 100644 --- a/awx/ui_next/src/screens/Organization/OrganizationNotifications/__snapshots__/OrganizationNotifications.test.jsx.snap +++ b/awx/ui_next/src/screens/Organization/OrganizationNotifications/__snapshots__/OrganizationNotifications.test.jsx.snap @@ -293,10 +293,10 @@ exports[` initially renders succesfully 1`] = ` }, ] } + fillWidth={false} i18n={"/i18n/"} isAllSelected={false} isCompact={false} - noLeftMargin={false} onCompact={null} onExpand={null} onSearch={[Function]} @@ -335,28 +335,30 @@ exports[` initially renders succesfully 1`] = `
- initially renders succesfully 1`] = ` } } forwardedRef={null} - marginleft={0} >
initially renders succesfully 1`] = ` "componentStyle": ComponentStyle { "componentId": "DataListToolbar__ColumnLeft-ajzso8-3", "isStatic": true, - "lastClassName": "feZLWt", + "lastClassName": "bpkKMr", "rules": Array [ - "display:flex;flex-basis:100%;justify-content:flex-start;align-items:center;padding:10px 0 8px 0;@media screen and (min-width:980px){flex-basis:50%;}", + "display:flex;flex-grow:1;justify-content:flex-start;align-items:center;padding:10px 0 8px 0;", ], }, "displayName": "DataListToolbar__ColumnLeft", @@ -401,7 +402,7 @@ exports[` initially renders succesfully 1`] = ` forwardedRef={null} >
initially renders succesfully 1`] = ` "$$typeof": Symbol(react.forward_ref), "attrs": Array [], "componentStyle": ComponentStyle { - "componentId": "sc-htpNat", + "componentId": "sc-bxivhb", "isStatic": true, - "lastClassName": "dqEVhr", + "lastClassName": "gYEJOJ", "rules": Array [ "flex-grow: 1;", ], @@ -420,7 +421,7 @@ exports[` initially renders succesfully 1`] = ` "displayName": "Styled(ToolbarItem)", "foldedComponentIds": Array [], "render": [Function], - "styledComponentId": "sc-htpNat", + "styledComponentId": "sc-bxivhb", "target": [Function], "toString": [Function], "warnTooManyClasses": [Function], @@ -430,10 +431,10 @@ exports[` initially renders succesfully 1`] = ` forwardedRef={null} >
initially renders succesfully 1`] = ` "componentStyle": ComponentStyle { "componentId": "DataListToolbar__ColumnRight-ajzso8-4", "isStatic": true, - "lastClassName": "Deoai", + "lastClassName": "aHlzn", "rules": Array [ - "display:flex;flex-basis:100%;justify-content:flex-start;align-items:center;padding:10px 0 8px 0;@media screen and (min-width:980px){flex-basis:50%;}", - "padding:8px 0 10px 0;@media screen and (min-width:980px){margin-left:0;padding:10px 0 8px 0;}", + "flex-grow:0;display:flex;justify-content:flex-start;align-items:center;padding:10px 0 8px 0;", ], }, "displayName": "DataListToolbar__ColumnRight", - "foldedComponentIds": Array [ - "DataListToolbar__ColumnLeft-ajzso8-3", - ], + "foldedComponentIds": Array [], "render": [Function], "styledComponentId": "DataListToolbar__ColumnRight-ajzso8-4", "target": "div", @@ -1038,7 +1036,7 @@ exports[` initially renders succesfully 1`] = ` forwardedRef={null} >
initially renders succesfully 1`] = `
- +