mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Move NOOP_CONTROL to storybook utils and change to a standalone file (#31421)
This commit is contained in:
parent
127effc8ab
commit
af12e6d20e
@ -59,5 +59,3 @@ export const parameters = {
|
|||||||
escapeHTML: false,
|
escapeHTML: false,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export const NOOP_CONTROL = { control: { disable: true } };
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Story } from '@storybook/react';
|
import { Story } from '@storybook/react';
|
||||||
import { BarGauge, BarGaugeDisplayMode } from '@grafana/ui';
|
import { BarGauge, BarGaugeDisplayMode } from '@grafana/ui';
|
||||||
import { NOOP_CONTROL } from '@grafana/ui/.storybook/preview';
|
import { NOOP_CONTROL } from '../../utils/storybook/noopControl';
|
||||||
import { VizOrientation, ThresholdsMode, Field, FieldType, getDisplayProcessor } from '@grafana/data';
|
import { VizOrientation, ThresholdsMode, Field, FieldType, getDisplayProcessor } from '@grafana/data';
|
||||||
import { Props } from './BarGauge';
|
import { Props } from './BarGauge';
|
||||||
import { withCenteredStory } from '../../utils/storybook/withCenteredStory';
|
import { withCenteredStory } from '../../utils/storybook/withCenteredStory';
|
||||||
|
@ -11,7 +11,7 @@ import {
|
|||||||
import { withCenteredStory } from '../../utils/storybook/withCenteredStory';
|
import { withCenteredStory } from '../../utils/storybook/withCenteredStory';
|
||||||
import mdx from './BigValue.mdx';
|
import mdx from './BigValue.mdx';
|
||||||
import { useTheme } from '../../themes';
|
import { useTheme } from '../../themes';
|
||||||
import { NOOP_CONTROL } from '@grafana/ui/.storybook/preview';
|
import { NOOP_CONTROL } from '../../utils/storybook/noopControl';
|
||||||
import { ArrayVector, FieldSparkline, FieldType } from '@grafana/data';
|
import { ArrayVector, FieldSparkline, FieldType } from '@grafana/data';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -2,7 +2,7 @@ import React from 'react';
|
|||||||
import { Story } from '@storybook/react';
|
import { Story } from '@storybook/react';
|
||||||
import { withCenteredStory } from '../../utils/storybook/withCenteredStory';
|
import { withCenteredStory } from '../../utils/storybook/withCenteredStory';
|
||||||
import { ButtonCascader } from '@grafana/ui';
|
import { ButtonCascader } from '@grafana/ui';
|
||||||
import { NOOP_CONTROL } from '@grafana/ui/.storybook/preview';
|
import { NOOP_CONTROL } from '../../utils/storybook/noopControl';
|
||||||
import { ButtonCascaderProps } from './ButtonCascader';
|
import { ButtonCascaderProps } from './ButtonCascader';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { renderComponentWithTheme } from '../../utils/storybook/withTheme';
|
import { renderComponentWithTheme } from '../../utils/storybook/withTheme';
|
||||||
import { CallToActionCard, CallToActionCardProps } from './CallToActionCard';
|
import { CallToActionCard, CallToActionCardProps } from './CallToActionCard';
|
||||||
import { NOOP_CONTROL } from '../../../.storybook/preview';
|
import { NOOP_CONTROL } from '../../utils/storybook/noopControl';
|
||||||
import { Story } from '@storybook/react';
|
import { Story } from '@storybook/react';
|
||||||
import { Button } from '../Button/Button';
|
import { Button } from '../Button/Button';
|
||||||
import { action } from '@storybook/addon-actions';
|
import { action } from '@storybook/addon-actions';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Story } from '@storybook/react';
|
import { Story } from '@storybook/react';
|
||||||
import { withCenteredStory } from '../../utils/storybook/withCenteredStory';
|
import { withCenteredStory } from '../../utils/storybook/withCenteredStory';
|
||||||
import { NOOP_CONTROL } from '../../../.storybook/preview';
|
import { NOOP_CONTROL } from '../../utils/storybook/noopControl';
|
||||||
import { Cascader } from '@grafana/ui';
|
import { Cascader } from '@grafana/ui';
|
||||||
import { CascaderProps } from './Cascader';
|
import { CascaderProps } from './Cascader';
|
||||||
import mdx from './Cascader.mdx';
|
import mdx from './Cascader.mdx';
|
||||||
|
1
packages/grafana-ui/src/utils/storybook/noopControl.tsx
Normal file
1
packages/grafana-ui/src/utils/storybook/noopControl.tsx
Normal file
@ -0,0 +1 @@
|
|||||||
|
export const NOOP_CONTROL = { control: { disable: true } };
|
@ -1,12 +1,4 @@
|
|||||||
{
|
{
|
||||||
"exclude": [
|
"exclude": ["**/*.story.tsx", "**/*.test.ts*", "**/*.tmpl.ts", "dist", "node_modules", "src/utils/storybook"],
|
||||||
"**/*.story.tsx",
|
|
||||||
"**/*.story.internal.tsx",
|
|
||||||
"**/*.test.ts*",
|
|
||||||
"**/*.tmpl.ts",
|
|
||||||
"dist",
|
|
||||||
"node_modules",
|
|
||||||
"src/utils/storybook"
|
|
||||||
],
|
|
||||||
"extends": "./tsconfig.json"
|
"extends": "./tsconfig.json"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user