Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Moves OnPasteSelect tests to component's folder #13338

Merged
merged 1 commit into from
Mar 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion superset-frontend/src/components/Select/Select.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const OPTIONS = [
];

export default {
title: 'Select component',
title: 'Select',
argTypes: {
options: {
type: 'select',
Expand Down Expand Up @@ -92,6 +92,14 @@ SelectGallery.args = {
options: OPTIONS,
};

SelectGallery.story = {
parameters: {
knobs: {
disabled: true,
},
},
};

// eslint-disable-next-line @typescript-eslint/no-unused-vars
export const InteractiveSelect = (args: any) => {
const [{ value, multi, clearable, placeholder }, updateArgs] = useArgs();
Expand Down Expand Up @@ -125,3 +133,11 @@ InteractiveSelect.args = {
clearable: false,
placeholder: "I'm interactive",
};

InteractiveSelect.story = {
parameters: {
knobs: {
disabled: true,
},
},
};
4 changes: 2 additions & 2 deletions superset-frontend/src/components/Select/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
export * from './SupersetStyledSelect';
export * from './Select';
export * from './styles';
export { default } from './SupersetStyledSelect';
export { default } from './Select';
export { default as OnPasteSelect } from './OnPasteSelect';
2 changes: 1 addition & 1 deletion superset-frontend/src/components/Select/styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { Props as SelectProps } from 'react-select/src/Select';
import { colors as reactSelectColors } from 'react-select/src/theme';
import { DeepNonNullable } from 'react-select/src/components';
import { OptionType } from 'antd/lib/select';
import { SupersetStyledSelectProps } from './SupersetStyledSelect';
import { SupersetStyledSelectProps } from './Select';

export const DEFAULT_CLASS_NAME = 'Select';
export const DEFAULT_CLASS_NAME_PREFIX = 'Select';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
import { FormInstance } from 'antd/lib/form';
import React, { useCallback } from 'react';
import { Checkbox, Form, Input, Typography } from 'src/common/components';
import { Select } from 'src/components/Select/SupersetStyledSelect';
import { Select } from 'src/components/Select';
import SupersetResourceSelect from 'src/components/SupersetResourceSelect';
import { addDangerToast } from 'src/messageToasts/actions';
import { ClientErrorObject } from 'src/utils/getClientErrorObject';
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/explore/components/SaveModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { Radio } from 'src/common/components/Radio';
import Modal from 'src/common/components/Modal';
import Button from 'src/components/Button';
import FormLabel from 'src/components/FormLabel';
import { CreatableSelect } from 'src/components/Select/SupersetStyledSelect';
import { CreatableSelect } from 'src/components/Select';
import { connect } from 'react-redux';

// Session storage key for recent dashboard
Expand Down