Standardize imports

This commit is contained in:
jonniebigodes 2023-05-25 21:44:48 +01:00
parent 16b100fe88
commit 13a12dc83e
69 changed files with 17 additions and 155 deletions

View File

@ -6,11 +6,6 @@ import type { Meta } from '@storybook/angular';
import { Button } from './button.component';
const meta: Meta<Button> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Button',
component: Button,
parameters: {
myAddon: { disable: true }, // Disables the addon

View File

@ -6,11 +6,6 @@ import type { Meta, StoryObj } from '@storybook/angular';
import { Checkbox } from './checkbox.component';
const meta: Meta<Checkbox> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/angular/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Checkbox',
component: Checkbox,
};

View File

@ -9,7 +9,6 @@ import { MyComponent } from './MyComponent.component';
// More on default export: https://storybook.js.org/docs/angular/writing-stories/introduction#default-export
const meta: Meta<MyComponent> = {
title: 'FigmaExample',
component: MyComponent,
decorators: [withDesign],
};

View File

@ -19,11 +19,6 @@ const image = {
alt: 'my image',
};
/*
*👇 Render functions are a framework specific feature to allow you control on how the component renders.
* See https://storybook.js.org/docs/angular/api/csf
* to learn how to use render functions.
*/
export const WithAnImage: Story = {
render: () => ({
props: {

View File

@ -24,11 +24,6 @@ const meta: Meta<TodoItem> = {
export default meta;
type Story = StoryObj<TodoItem>;
/*
*👇 Render functions are a framework specific feature to allow you control on how the component renders.
* See https://storybook.js.org/docs/angular/api/csf
* to learn how to use render functions.
*/
export const Primary: Story = {
render: (args, { loaded: { todo } }) => ({
props: {

View File

@ -12,11 +12,6 @@ const meta: Meta<Table> = {
export default meta;
type Story = StoryObj<Table>;
/*
*👇 Render functions are a framework specific feature to allow you control on how the component renders.
* See https://storybook.js.org/docs/angular/api/csf
* to learn how to use render functions.
*/
export const Numeric: Story = {
render: (args) => ({
props: args,

View File

@ -2,7 +2,7 @@
// Button.stories.ts|tsx
// Replace your-framework with the name of your framework
import type { Meta } from '@storybook/<your-framework>';
import type { Meta } from '@storybook/your-framework';
import { Button } from './Button';

View File

@ -2,7 +2,7 @@
// Button.stories.ts|tsx
// Replace your-framework with the name of your framework
import type { Meta } from '@storybook/<your-framework>';
import type { Meta } from '@storybook/your-framework';
import { Button } from './Button';

View File

@ -2,7 +2,7 @@
// Button.stories.ts|tsx
// Replace your-framework with the name of your framework
import type { Meta, StoryObj } from '@storybook/<your-framework>';
import type { Meta, StoryObj } from '@storybook/your-framework';
import { Button } from './Button';

View File

@ -2,7 +2,7 @@
// Button.stories.ts|tsx
// Replace your-framework with the name of your framework
import type { Meta, StoryObj } from '@storybook/<your-framework>';
import type { Meta, StoryObj } from '@storybook/your-framework';
import { Button } from './Button';

View File

@ -2,7 +2,7 @@
// Button.stories.ts|tsx
// Replace your-framework with the name of your framework
import type { Meta } from '@storybook/<your-framework>';
import type { Meta } from '@storybook/your-framework';
import { Button } from './Button';

View File

@ -2,7 +2,7 @@
// Button.stories.ts|tsx
// Replace your-framework with the name of your framework
import type { Meta } from '@storybook/<your-framework>';
import type { Meta } from '@storybook/your-framework';
import { Button } from './Button';

View File

@ -2,7 +2,7 @@
// Button.stories.ts|tsx
// Replace your-framework with the name of your framework
import type { Meta, StoryObj } from '@storybook/<your-framework>';
import type { Meta, StoryObj } from '@storybook/your-framework';
import { Button } from './Button';

View File

@ -2,7 +2,7 @@
// Button.stories.ts|tsx
// Replace your-framework with the name of your framework
import type { Meta, StoryObj } from '@storybook/<your-framework>';
import type { Meta, StoryObj } from '@storybook/your-framework';
import { Button } from './Button';

View File

@ -2,7 +2,7 @@
// Button.stories.ts|tsx
// Replace your-framework with the name of your framework
import type { Meta, StoryObj } from '@storybook/<your-framework>';
import type { Meta, StoryObj } from '@storybook/your-framework';
import { Button } from './Button';

View File

@ -2,7 +2,7 @@
// Button.stories.ts|tsx
// Replace your-framework with the name of your framework
import type { Meta, StoryObj } from '@storybook/<your-framework>';
import type { Meta, StoryObj } from '@storybook/your-framework';
import { Button } from './Button';

View File

@ -2,7 +2,7 @@
// Button.stories.ts|tsx
// Replace your-framework with the name of your framework
import type { Meta, StoryObj } from '@storybook/<your-framework>';
import type { Meta, StoryObj } from '@storybook/your-framework';
import { Button } from './Button';

View File

@ -2,7 +2,7 @@
// Button.stories.ts|tsx
// Replace your-framework with the name of your framework
import type { Meta, StoryObj } from '@storybook/<your-framework>';
import type { Meta, StoryObj } from '@storybook/your-framework';
import { Button } from './Button';

View File

@ -2,7 +2,7 @@
// Button.stories.ts|tsx
// Replace your-framework with the name of your framework
import type { Meta, StoryObj } from '@storybook/<your-framework>';
import type { Meta, StoryObj } from '@storybook/your-framework';
import { Button } from './Button';

View File

@ -2,7 +2,7 @@
// Button.stories.ts|tsx
// Replace your-framework with the name of your framework
import type { Meta, StoryObj } from '@storybook/<your-framework>';
import type { Meta, StoryObj } from '@storybook/your-framework';
import { Button } from './Button';

View File

@ -7,11 +7,6 @@ import type { Meta, StoryObj } from '@storybook/your-framework';
import { Checkbox } from './Checkbox';
const meta = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Checkbox',
component: Checkbox,
} satisfies Meta<typeof Checkbox>;

View File

@ -7,11 +7,6 @@ import type { Meta, StoryObj } from '@storybook/your-framework';
import { Checkbox } from './Checkbox';
const meta: Meta<typeof Checkbox> = {
/* 👇 The title prop is optional.
* See https://storybook.js.org/docs/react/configure/overview#configure-story-loading
* to learn how to generate automatic titles
*/
title: 'Checkbox',
component: Checkbox,
};

View File

@ -2,7 +2,7 @@
// Form.stories.ts|tsx
// Replace your-framework with the name of your framework
import type { Meta, StoryObj } from '@storybook/<your-framework>';
import type { Meta, StoryObj } from '@storybook/your-framework';
import { userEvent, waitFor, within } from '@storybook/testing-library';

View File

@ -2,7 +2,7 @@
// Form.stories.ts|tsx
// Replace your-framework with the name of your framework
import type { Meta, StoryObj } from '@storybook/<your-framework>';
import type { Meta, StoryObj } from '@storybook/your-framework';
import { userEvent, waitFor, within } from '@storybook/testing-library';

View File

@ -1,8 +1,6 @@
```js
// ButtonGroup.stories.js|jsx
import React from 'react';
import { ButtonGroup } from '../ButtonGroup';
//👇 Imports the Button stories

View File

@ -1,8 +1,6 @@
```js
// Button.stories.js|jsx
import React from 'react';
import { action } from '@storybook/addon-actions';
import { Button } from './Button';

View File

@ -1,7 +1,5 @@
```js
// Button.stories.js|jsx|ts|tsx
import React from 'react';
// Button.stories.js|jsx
import { action } from '@storybook/addon-actions';

View File

@ -1,8 +1,6 @@
```js
// Button.stories.js|jsx
import React from 'react';
import { action } from '@storybook/addon-actions';
import { Button } from './Button';

View File

@ -1,8 +1,6 @@
```js
// Button.stories.js|jsx
import React from 'react';
import { Button } from './Button';
export default {

View File

@ -1,8 +1,6 @@
```js
// Button.stories.js|jsx
import React from 'react';
import { Button } from './Button';
export default {

View File

@ -1,8 +1,6 @@
```js
// Button.stories.js|jsx
import React from 'react';
import { Button } from './Button';
export default {

View File

@ -1,8 +1,6 @@
```js
// Button.stories.js|jsx
import React from 'react';
import { Button } from './Button';
export default {

View File

@ -1,8 +1,6 @@
```js
// Button.stories.js|jsx
import React from 'react';
import { Button } from './Button';
export default {

View File

@ -1,8 +1,6 @@
```js
// Button.stories.js|jsx
import React from 'react';
import { Button } from './Button';
export default {

View File

@ -1,8 +1,6 @@
```js
// Button.stories.js|jsx
import React from 'react';
import { Button } from './Button';
export default {

View File

@ -1,8 +1,6 @@
```js
// Button.stories.js|jsx
import React from 'react';
import { Button } from './Button';
export default {

View File

@ -1,8 +1,6 @@
```ts
// Button.stories.js|jsx
import React from 'react';
import { Button } from './Button';
export default {

View File

@ -1,8 +1,6 @@
```js
// Button.stories.js|jsx
import React from 'react';
import { Button } from './Button';
export default {

View File

@ -1,8 +1,6 @@
```js
// Button.stories.js|jsx
import React from 'react';
import { Button } from './Button';
export default {

View File

@ -1,8 +1,6 @@
```js
// YourComponent.stories.js|jsx
import React from 'react';
import { YourComponent } from './your-component';
export default {

View File

@ -1,15 +1,12 @@
```js
// MyComponent.stories.js|jsx
import React from 'react';
import { withDesign } from 'storybook-addon-designs';
import { MyComponent } from './MyComponent';
// More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
export default {
title: 'FigmaExample',
component: MyComponent,
decorators: [withDesign],
};

View File

@ -9,7 +9,6 @@ import { MyComponent } from './MyComponent';
// More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
const meta = {
title: 'FigmaExample',
component: MyComponent,
decorators: [withDesign],
} satisfies Meta<typeof MyComponent>;

View File

@ -9,7 +9,6 @@ import { MyComponent } from './MyComponent';
// More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
const meta: Meta<typeof MyComponent> = {
title: 'FigmaExample',
component: MyComponent,
decorators: [withDesign],
};

View File

@ -1,8 +1,6 @@
```js
// MyComponent.stories.js|jsx
import React from 'react';
import { MyComponent } from './MyComponent';
import imageFile from './static/image.png';

View File

@ -1,8 +1,6 @@
```js
// Button.stories.js|jsx
import React from 'react';
import { Button } from './Button';
export default {

View File

@ -1,8 +1,6 @@
```js
// List.stories.js|jsx
import React from 'react';
import { List } from './List';
import { ListItem } from './ListItem';

View File

@ -1,8 +1,6 @@
```js
// List.stories.js|jsx
import React from 'react';
import { List } from './List';
export default {

View File

@ -1,8 +1,6 @@
```js
// List.stories.js|jsx
import React from 'react';
import { List } from './List';
import { ListItem } from './ListItem';

View File

@ -1,8 +1,6 @@
```js
// List.stories.js|jsx
import React from 'react';
import { List } from './List';
//👇 Instead of importing ListItem, we import the stories

View File

@ -1,8 +1,6 @@
```js
// List.stories.js|jsx
import React from 'react';
import { List } from './List';
//👇 Instead of importing ListItem, we import the stories

View File

@ -1,8 +1,6 @@
```js
// TodoItem.stories.js|jsx
import React from 'react';
import fetch from 'node-fetch';
import { TodoItem } from './TodoItem';

View File

@ -1,8 +1,6 @@
```js
// MyComponent.story.js|jsx
import React from 'react';
import { MyComponent } from './MyComponent';
export default {

View File

@ -1,19 +1,12 @@
```js
// Page.stories.js|jsx
import React from 'react';
import { Page } from './Page';
export default {
component: Page,
};
/*
*👇 Render functions are a framework specific feature to allow you control on how the component renders.
* See https://storybook.js.org/docs/react/api/csf
* to learn how to use render functions.
*/
export const CustomFooter = {
render: (args) => (
<Page {...args}>

View File

@ -1,8 +1,6 @@
```js
// Table.stories.js|jsx
import React from 'react';
import { Table } from './Table';
import { TD } from './TableDataCell';
import { TR } from './TableRow';

View File

@ -1,8 +1,6 @@
```js
// YourComponent.stories.js|jsx
import React from 'react';
import { YourComponent } from './YourComponent';
export default {

View File

@ -1,8 +1,6 @@
```js
// Button.stories.js|jsx
import solid from 'solid';
import { action } from '@storybook/addon-actions';
import { Button } from './Button';

View File

@ -6,7 +6,6 @@ import { withDesign } from 'storybook-addon-designs';
import { MyComponent } from './MyComponent';
export default {
title: 'FigmaExample',
component: MyComponent,
decorators: [withDesign],
};

View File

@ -8,7 +8,6 @@ import { withDesign } from 'storybook-addon-designs';
import { MyComponent } from './MyComponent';
const meta = {
title: 'FigmaExample',
component: MyComponent,
decorators: [withDesign],
} satisfies Meta<typeof MyComponent>;

View File

@ -8,7 +8,6 @@ import { withDesign } from 'storybook-addon-designs';
import { MyComponent } from './MyComponent';
const meta: Meta<typeof MyComponent> = {
title: 'FigmaExample',
component: MyComponent,
decorators: [withDesign],
};

View File

@ -1,8 +1,6 @@
```js
// MyComponent.stories.js|jsx
import solid from 'solid';
import { Layout } from './Layout';
import { MyComponent } from './MyComponent';

View File

@ -7,16 +7,10 @@ import MyComponent from './MyComponent.svelte';
// More on default export: https://storybook.js.org/docs/svelte/writing-stories/introduction#default-export
export default {
title: 'FigmaExample',
component: { MyComponent },
decorators: [withDesign],
};
/*
*👇 Render functions are a framework specific feature to allow you control on how the component renders.
* See https://storybook.js.org/docs/svelte/api/csf
* to learn how to use render functions.
*/
export const Example = {
render: () => ({
Component: MyComponent,

View File

@ -7,16 +7,10 @@ import MyComponent from './MyComponent.vue';
// More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export
export default {
title: 'FigmaExample',
component: MyComponent,
decorators: [withDesign],
};
/*
*👇 Render functions are a framework specific feature to allow you control on how the component renders.
* See https://storybook.js.org/docs/vue/api/csf
* to learn how to use render functions.
*/
export const Example = {
render: () => ({
components: { MyComponent },

View File

@ -10,7 +10,6 @@ import MyComponent from './MyComponent.vue';
// More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export
const meta = {
title: 'FigmaExample',
component: MyComponent,
decorators: [withDesign],
} satisfies Meta<typeof MyComponent>;
@ -18,11 +17,6 @@ const meta = {
export default meta;
type Story = StoryObj<typeof meta>;
/*
*👇 Render functions are a framework specific feature to allow you control on how the component renders.
* See https://storybook.js.org/docs/vue/api/csf
* to learn how to use render functions.
*/
export const Example: Story = {
render: () => ({
components: { MyComponent },

View File

@ -10,7 +10,6 @@ import MyComponent from './MyComponent.vue';
// More on default export: https://storybook.js.org/docs/vue/writing-stories/introduction#default-export
const meta: Meta<typeof MyComponent> = {
title: 'FigmaExample',
component: MyComponent,
decorators: [withDesign],
};
@ -18,11 +17,6 @@ const meta: Meta<typeof MyComponent> = {
export default meta;
type Story = StoryObj<typeof MyComponent>;
/*
*👇 Render functions are a framework specific feature to allow you control on how the component renders.
* See https://storybook.js.org/docs/vue/api/csf
* to learn how to use render functions.
*/
export const Example: Story = {
render: () => ({
components: { MyComponent },

View File

@ -2,7 +2,6 @@
// Button.stories.js
export default {
title: 'Button',
component: 'demo-button',
parameters: {
myAddon: { disable: true }, // Disables the addon

View File

@ -4,7 +4,6 @@
import type { Meta } from '@storybook/web-components';
const meta: Meta = {
title: 'Button',
component: 'demo-button',
parameters: {
myAddon: { disable: true }, // Disables the addon

View File

@ -4,7 +4,6 @@
import type { Meta, StoryObj } from '@storybook/web-components';
const meta: Meta = {
title: 'Checkbox',
component: 'checkbox',
};

View File

@ -4,7 +4,6 @@
import { withDesign } from 'storybook-addon-designs';
export default {
title: 'FigmaExample',
component: 'my-component',
decorators: [withDesign],
};

View File

@ -6,7 +6,6 @@ import type { Meta, StoryObj } from '@storybook/web-components';
import { withDesign } from 'storybook-addon-designs';
const meta: Meta = {
title: 'FigmaExample',
component: 'my-component',
decorators: [withDesign],
};