Skip to content

Commit

Permalink
Fix must have default exports errors on stories: https://github.com/s…
Browse files Browse the repository at this point in the history
  • Loading branch information
juliewongbandue committed Jun 23, 2023
1 parent 0650f31 commit 79e1339
Show file tree
Hide file tree
Showing 27 changed files with 92 additions and 43 deletions.
5 changes: 3 additions & 2 deletions src/components/Panel/Panel.story.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
import React, { useState } from 'react';
import { Story } from '@storybook/react';
import { StoryFn } from '@storybook/react';

import { Panel } from './Panel';
import { Props } from './Panel.types';

import { Button } from '../../components';
import { Layout } from '../../storybook';

export default {
title: 'components/Panel',
component: Panel,
};

const Template: Story<Props> = ({ content = <div />, ...args }) => {
const Template: StoryFn<Props> = ({ content = <div />, ...args }) => {
const [active, activeSet] = useState(true);
const toggle = () => activeSet((active) => !active);

Expand Down
4 changes: 4 additions & 0 deletions src/components/Panel/props/active.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ import { Panel } from '../Panel';

import { Layout } from '../../../storybook';

export default {
component: Panel,
title: 'components/Panel/props',
};
export function Active() {
const content = <div />;

Expand Down
4 changes: 4 additions & 0 deletions src/components/Panel/props/attach.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ import { Panel } from '../Panel';
import { Button } from '../../../components';
import { Layout } from '../../../storybook';

export default {
component: Panel,
title: 'components/Panel/props',
};
export function Attach() {
const [active, setActive] = useState({ right: false, left: false });

Expand Down
10 changes: 0 additions & 10 deletions src/components/Panel/props/props.story.tsx

This file was deleted.

4 changes: 4 additions & 0 deletions src/components/Panel/props/resizable.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ import { Panel } from '../Panel';
import { Button } from '../../../components';
import { Layout } from '../../../storybook';

export default {
component: Panel,
title: 'components/Panel/props',
};
export function Resizable() {
const [active, activeSet] = useState(true);
const toggle = () => activeSet((active) => !active);
Expand Down
5 changes: 5 additions & 0 deletions src/components/TourPoint/examples/ChildrenResize.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ import { Header, Paragraph } from '../../../typography';
import { History, Plus } from '../../../icons';
import { StoryControlBar } from '../../../storybook';

export default {
component: TourPoint,
title: 'components/TourPoint/examples',
};

export function ChildrenResize() {
function Children() {
const { active, activeSet } = useContext(TourContext);
Expand Down
5 changes: 5 additions & 0 deletions src/components/TourPoint/examples/InsidePopOver.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ import { Tour } from '../TourPoint.context';
import { PopOver } from '../../PopOver/PopOver';
import { Paragraph } from '../../../typography';

export default {
component: TourPoint,
title: 'components/TourPoint/examples',
};

export function InsidePopOver() {
const [active, activeSet] = useState(false);
const getStepsTranslation = ({
Expand Down
5 changes: 5 additions & 0 deletions src/components/TourPoint/examples/Sequence.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ import { Card } from '../TourPoint.story';
import { Button } from '../../../components';
import { StoryControlBar } from '../../../storybook';

export default {
component: TourPoint,
title: 'components/TourPoint/examples',
};

export function Sequence() {
function Children() {
const { active, activeSet } = useContext(TourContext);
Expand Down
15 changes: 0 additions & 15 deletions src/components/TourPoint/examples/examples.story.tsx

This file was deleted.

4 changes: 4 additions & 0 deletions src/components/TourPoint/props/active.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ import { Card } from '../TourPoint.story';
import { Button } from '../../../components';
import { StoryControlBar } from '../../../storybook';

export default {
component: TourPoint,
title: 'components/TourPoint/props',
};
export function Active() {
const [active, activeSet] = useState(true);

Expand Down
4 changes: 4 additions & 0 deletions src/components/TourPoint/props/attach.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ import { Card } from '../TourPoint.story';
import { Button } from '../../../components';
import { StoryControlBar } from '../../../storybook';

export default {
component: TourPoint,
title: 'components/TourPoint/props',
};
export function Attach() {
function Children() {
const { active, activeSet } = useContext(TourContext);
Expand Down
4 changes: 4 additions & 0 deletions src/components/TourPoint/props/confirmation.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ import { Button } from '../../../components';
import { Gear } from '../../../icons';
import { StoryControlBar } from '../../../storybook';

export default {
component: TourPoint,
title: 'components/TourPoint/props',
};
export function Confirmation() {
function Children() {
const { active, activeSet } = useContext(TourContext);
Expand Down
4 changes: 4 additions & 0 deletions src/components/TourPoint/props/dismission.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ import { Button } from '../../../components';
import { Gear } from '../../../icons';
import { StoryControlBar } from '../../../storybook';

export default {
component: TourPoint,
title: 'components/TourPoint/props',
};
export function Dismission() {
function Children() {
const { active, activeSet } = useContext(TourContext);
Expand Down
13 changes: 0 additions & 13 deletions src/components/TourPoint/props/props.story.tsx

This file was deleted.

4 changes: 4 additions & 0 deletions src/components/TourPoint/props/src.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ import { Card } from '../TourPoint.story';
import { Input } from '../../../components';
import { StoryControlBar } from '../../../storybook';

export default {
component: TourPoint,
title: 'components/TourPoint/props',
};
export function Src() {
const [src, srcSet] = useState('http://placekitten.com/320/213');

Expand Down
4 changes: 4 additions & 0 deletions src/components/TourPoint/props/title.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ import { Card } from '../TourPoint.story';
import { Input } from '../../../components';
import { StoryControlBar } from '../../../storybook';

export default {
component: TourPoint,
title: 'components/TourPoint/props',
};
export function Title() {
const [title, titleSet] = useState('A Fresh New Look');

Expand Down
4 changes: 4 additions & 0 deletions src/tokens/color/background/background.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ import { core } from '../../core';
import { Card, Canvas } from '../../storybook';
import { tx } from '../../util';

export default {
title: 'Tokens/color',
};

export function Tokens() {
return (
<>
Expand Down
4 changes: 4 additions & 0 deletions src/tokens/color/format/format.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ import { Card, Canvas } from '../../storybook';

import { Text } from '../../../typography';

export default {
title: 'Tokens/color',
};

export function Tokens() {
return (
<Canvas>
Expand Down
4 changes: 4 additions & 0 deletions src/tokens/color/livestream/livestream.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ import { Card, Canvas } from '../../storybook';

import { Text } from '../../../typography';

export default {
title: 'Tokens/color',
};

export function Tokens() {
return (
<Canvas>
Expand Down
4 changes: 4 additions & 0 deletions src/tokens/color/rainbow/rainbow.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ import { Card, Canvas } from '../../storybook';

import { Text } from '../../../typography';

export default {
title: 'Tokens/color',
};

export function Tokens() {
const styleText = {
background: 'rgba(0,0,0,0.2)',
Expand Down
4 changes: 4 additions & 0 deletions src/tokens/color/status/status.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ import { Canvas, Card } from '../../storybook';

import { Text } from '../../../typography';

export default {
title: 'Tokens/color',
};

export function Tokens() {
return (
<Canvas>
Expand Down
4 changes: 4 additions & 0 deletions src/tokens/color/stroke/stroke.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ import { Card, Canvas } from '../../storybook';

import { Text } from '../../../typography';

export default {
title: 'Tokens/color',
};

export function Tokens() {
return (
<Canvas>
Expand Down
4 changes: 4 additions & 0 deletions src/tokens/color/surface/surface.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ import { core } from '../../core';
import { Card, Canvas } from '../../storybook';
import { tx } from '../../util';

export default {
title: 'Tokens/color',
};

export function Tokens() {
return (
<>
Expand Down
4 changes: 4 additions & 0 deletions src/tokens/color/text/text.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ import { core } from '../../core';
import { Card, Canvas } from '../../storybook';
import { tx } from '../../util';

export default {
title: 'Tokens/color',
};

export function Tokens() {
return (
<>
Expand Down
4 changes: 4 additions & 0 deletions src/tokens/color/upsell/upsell.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ import { Card, Canvas } from '../../storybook';

import { Text } from '../../../typography';

export default {
title: 'Tokens/color',
};

export function Tokens() {
const styleText = {
background: 'rgba(0,0,0,0.2)',
Expand Down
2 changes: 2 additions & 0 deletions src/tokens/typography/size/size.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import { Text } from '../../../typography';
import { core } from '../../core';
import { Canvas } from '../../storybook';

export default { title: 'Tokens/typography' };

export function Tokens() {
return (
<Canvas>
Expand Down
3 changes: 0 additions & 3 deletions src/tokens/typography/typography.story.tsx

This file was deleted.

0 comments on commit 79e1339

Please sign in to comment.