mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 02:50:02 -03:30
Remove Switch component
This commit is contained in:
parent
ef3ab29649
commit
446021cf22
@ -164,7 +164,7 @@ class NotificationList extends Component {
|
||||
}
|
||||
this.setState(stateUpdateFunction);
|
||||
} catch (err) {
|
||||
this.setState({ toggleError: true });
|
||||
this.setState({ toggleError: err });
|
||||
} finally {
|
||||
this.setState({ toggleLoading: false });
|
||||
}
|
||||
|
||||
@ -8,8 +8,8 @@ import {
|
||||
DataListItemRow,
|
||||
DataListItemCells,
|
||||
DataListCell as PFDataListCell,
|
||||
Switch,
|
||||
} from '@patternfly/react-core';
|
||||
import Switch from '@components/Switch';
|
||||
|
||||
import styled from 'styled-components';
|
||||
|
||||
|
||||
@ -1,10 +0,0 @@
|
||||
import { Switch } from '@patternfly/react-core';
|
||||
import styled from 'styled-components';
|
||||
|
||||
Switch.displayName = 'PFSwitch';
|
||||
export default styled(Switch)`
|
||||
display: flex;
|
||||
flex-wrap: no-wrap;
|
||||
/* workaround PF bug; used in calculating switch width: */
|
||||
--pf-c-switch__toggle-icon--Offset: 0.125rem;
|
||||
`;
|
||||
@ -1 +0,0 @@
|
||||
export { default } from './Switch';
|
||||
@ -3,7 +3,7 @@ import { Link, useHistory, useParams, useLocation } from 'react-router-dom';
|
||||
import { withI18n } from '@lingui/react';
|
||||
import { t } from '@lingui/macro';
|
||||
import { Host } from '@types';
|
||||
import { Button } from '@patternfly/react-core';
|
||||
import { Button, Switch } from '@patternfly/react-core';
|
||||
import { CardBody, CardActionsRow } from '@components/Card';
|
||||
import AlertModal from '@components/AlertModal';
|
||||
import ErrorDetail from '@components/ErrorDetail';
|
||||
@ -11,7 +11,6 @@ import { DetailList, Detail, UserDateDetail } from '@components/DetailList';
|
||||
import { VariablesDetail } from '@components/CodeMirrorInput';
|
||||
import { Sparkline } from '@components/Sparkline';
|
||||
import DeleteButton from '@components/DeleteButton';
|
||||
import Switch from '@components/Switch';
|
||||
import { HostsAPI } from '@api';
|
||||
|
||||
function HostDetail({ host, i18n, onUpdateHost }) {
|
||||
|
||||
@ -34,7 +34,7 @@ class HostsList extends Component {
|
||||
selected: [],
|
||||
itemCount: 0,
|
||||
actions: null,
|
||||
toggleError: false,
|
||||
toggleError: null,
|
||||
toggleLoading: null,
|
||||
};
|
||||
|
||||
@ -83,7 +83,7 @@ class HostsList extends Component {
|
||||
}
|
||||
|
||||
handleHostToggleErrorClose() {
|
||||
this.setState({ toggleError: false });
|
||||
this.setState({ toggleError: null });
|
||||
}
|
||||
|
||||
async handleHostDelete() {
|
||||
@ -112,7 +112,7 @@ class HostsList extends Component {
|
||||
),
|
||||
});
|
||||
} catch (err) {
|
||||
this.setState({ toggleError: true });
|
||||
this.setState({ toggleError: err });
|
||||
} finally {
|
||||
this.setState({ toggleLoading: null });
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@ import {
|
||||
DataListItem,
|
||||
DataListItemRow,
|
||||
DataListItemCells,
|
||||
Switch,
|
||||
Tooltip,
|
||||
} from '@patternfly/react-core';
|
||||
import { Link } from 'react-router-dom';
|
||||
@ -16,7 +17,6 @@ import DataListCell from '@components/DataListCell';
|
||||
import DataListCheck from '@components/DataListCheck';
|
||||
import ListActionButton from '@components/ListActionButton';
|
||||
import { Sparkline } from '@components/Sparkline';
|
||||
import Switch from '@components/Switch';
|
||||
import VerticalSeparator from '@components/VerticalSeparator';
|
||||
import { Host } from '@types';
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@ import {
|
||||
DataListItem,
|
||||
DataListItemRow,
|
||||
DataListItemCells,
|
||||
Switch,
|
||||
Tooltip,
|
||||
} from '@patternfly/react-core';
|
||||
import { Link } from 'react-router-dom';
|
||||
@ -16,7 +17,6 @@ import DataListCell from '@components/DataListCell';
|
||||
import DataListCheck from '@components/DataListCheck';
|
||||
import ListActionButton from '@components/ListActionButton';
|
||||
import { Sparkline } from '@components/Sparkline';
|
||||
import Switch from '@components/Switch';
|
||||
import VerticalSeparator from '@components/VerticalSeparator';
|
||||
import { Host } from '@types';
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user