This is an automated email from the ASF dual-hosted git repository.

rusackas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 018caa5  chore: Moves Switch to the components folder (#14135)
018caa5 is described below

commit 018caa528a50f88f9e9b78c9dbf377508ff85394
Author: Michael S. Molina <[email protected]>
AuthorDate: Fri Apr 16 02:54:26 2021 -0300

    chore: Moves Switch to the components folder (#14135)
---
 .../spec/javascripts/views/CRUD/alert/AlertList_spec.jsx         | 2 +-
 .../spec/javascripts/views/CRUD/alert/AlertReportModal_spec.jsx  | 2 +-
 superset-frontend/src/common/components/common.stories.tsx       | 9 ---------
 .../src/{common => }/components/Switch/Switch.stories.tsx        | 0
 superset-frontend/src/{common => }/components/Switch/index.tsx   | 0
 superset-frontend/src/views/CRUD/alert/AlertList.tsx             | 2 +-
 superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx      | 2 +-
 7 files changed, 4 insertions(+), 13 deletions(-)

diff --git 
a/superset-frontend/spec/javascripts/views/CRUD/alert/AlertList_spec.jsx 
b/superset-frontend/spec/javascripts/views/CRUD/alert/AlertList_spec.jsx
index 3a1b095..b92e36c 100644
--- a/superset-frontend/spec/javascripts/views/CRUD/alert/AlertList_spec.jsx
+++ b/superset-frontend/spec/javascripts/views/CRUD/alert/AlertList_spec.jsx
@@ -23,7 +23,7 @@ import { Provider } from 'react-redux';
 import thunk from 'redux-thunk';
 import { styledMount as mount } from 'spec/helpers/theming';
 import waitForComponentToPaint from 'spec/helpers/waitForComponentToPaint';
-import { Switch } from 'src/common/components/Switch';
+import { Switch } from 'src/components/Switch';
 import ListView from 'src/components/ListView';
 import SubMenu from 'src/components/Menu/SubMenu';
 import AlertList from 'src/views/CRUD/alert/AlertList';
diff --git 
a/superset-frontend/spec/javascripts/views/CRUD/alert/AlertReportModal_spec.jsx 
b/superset-frontend/spec/javascripts/views/CRUD/alert/AlertReportModal_spec.jsx
index b4a0131..f494c23 100644
--- 
a/superset-frontend/spec/javascripts/views/CRUD/alert/AlertReportModal_spec.jsx
+++ 
b/superset-frontend/spec/javascripts/views/CRUD/alert/AlertReportModal_spec.jsx
@@ -26,7 +26,7 @@ import AlertReportModal from 
'src/views/CRUD/alert/AlertReportModal';
 import Modal from 'src/common/components/Modal';
 import { AsyncSelect, NativeGraySelect as Select } from 
'src/components/Select';
 import { Radio } from 'src/common/components/Radio';
-import { Switch } from 'src/common/components/Switch';
+import { Switch } from 'src/components/Switch';
 import TextAreaControl from 'src/explore/components/controls/TextAreaControl';
 import waitForComponentToPaint from 'spec/helpers/waitForComponentToPaint';
 import { styledMount as mount } from 'spec/helpers/theming';
diff --git a/superset-frontend/src/common/components/common.stories.tsx 
b/superset-frontend/src/common/components/common.stories.tsx
index c15ac5e..fa63130 100644
--- a/superset-frontend/src/common/components/common.stories.tsx
+++ b/superset-frontend/src/common/components/common.stories.tsx
@@ -24,7 +24,6 @@ import { CronPicker, CronError } from 
'src/components/CronPicker';
 import Modal from './Modal';
 import Tabs, { EditableTabs } from './Tabs';
 import { Tooltip as AntdTooltip } from './Tooltip';
-import { Switch as AntdSwitch } from './Switch';
 import { Menu, Input, Divider } from '.';
 import { Dropdown } from './Dropdown';
 import InfoTooltip from './InfoTooltip';
@@ -198,14 +197,6 @@ StyledInfoTooltip.argTypes = {
   },
 };
 
-export const Switch = () => (
-  <>
-    <AntdSwitch defaultChecked />
-    <br />
-    <AntdSwitch size="small" defaultChecked />
-  </>
-);
-
 export function StyledCronPicker() {
   // @ts-ignore
   const inputRef = useRef<Input>(null);
diff --git a/superset-frontend/src/common/components/Switch/Switch.stories.tsx 
b/superset-frontend/src/components/Switch/Switch.stories.tsx
similarity index 100%
rename from superset-frontend/src/common/components/Switch/Switch.stories.tsx
rename to superset-frontend/src/components/Switch/Switch.stories.tsx
diff --git a/superset-frontend/src/common/components/Switch/index.tsx 
b/superset-frontend/src/components/Switch/index.tsx
similarity index 100%
rename from superset-frontend/src/common/components/Switch/index.tsx
rename to superset-frontend/src/components/Switch/index.tsx
diff --git a/superset-frontend/src/views/CRUD/alert/AlertList.tsx 
b/superset-frontend/src/views/CRUD/alert/AlertList.tsx
index 78bec5a..931cd41 100644
--- a/superset-frontend/src/views/CRUD/alert/AlertList.tsx
+++ b/superset-frontend/src/views/CRUD/alert/AlertList.tsx
@@ -31,7 +31,7 @@ import ListView, {
   ListViewProps,
 } from 'src/components/ListView';
 import SubMenu, { SubMenuProps } from 'src/components/Menu/SubMenu';
-import { Switch } from 'src/common/components/Switch';
+import { Switch } from 'src/components/Switch';
 import { DATETIME_WITH_TIME_ZONE } from 'src/constants';
 import withToasts from 'src/messageToasts/enhancers/withToasts';
 import AlertStatusIcon from 'src/views/CRUD/alert/components/AlertStatusIcon';
diff --git a/superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx 
b/superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx
index 6f4d57f..34c71b9 100644
--- a/superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx
+++ b/superset-frontend/src/views/CRUD/alert/AlertReportModal.tsx
@@ -23,7 +23,7 @@ import { useSingleViewResource } from 'src/views/CRUD/hooks';
 
 import Icon from 'src/components/Icon';
 import Modal from 'src/common/components/Modal';
-import { Switch } from 'src/common/components/Switch';
+import { Switch } from 'src/components/Switch';
 import { Radio } from 'src/common/components/Radio';
 import { AsyncSelect, NativeGraySelect as Select } from 
'src/components/Select';
 import { FeatureFlag, isFeatureEnabled } from 'src/featureFlags';

Reply via email to