Move Switch into shared component directory and update tests

This commit is contained in:
Marliana Lara
2019-11-20 13:11:06 -05:00
parent 804a3c17bf
commit ea4e98c52a
7 changed files with 60 additions and 76 deletions

View File

@@ -4,12 +4,12 @@ import { withI18n } from '@lingui/react';
import { t } from '@lingui/macro';
import { Link } from 'react-router-dom';
import {
Switch as PFSwitch,
DataListItem,
DataListItemRow,
DataListItemCells,
DataListCell as PFDataListCell,
} from '@patternfly/react-core';
import Switch from '@components/Switch';
import styled from 'styled-components';
@@ -24,13 +24,6 @@ const DataListCell = styled(PFDataListCell)`
}
`;
const Switch = styled(PFSwitch)`
display: flex;
flex-wrap: no-wrap;
/* workaround PF bug; used in calculating switch width: */
--pf-c-switch__toggle-icon--Offset: 0.125rem;
`;
function NotificationListItem(props) {
const {
canToggleNotifications,