Skip to content

Commit

Permalink
refactor(spindle-ui): replace icon index imports with direct imports …
Browse files Browse the repository at this point in the history
…in mdx/stories
  • Loading branch information
kc7891 committed Dec 4, 2024
1 parent 8329eb4 commit 9e99c9d
Show file tree
Hide file tree
Showing 10 changed files with 383 additions and 363 deletions.
5 changes: 4 additions & 1 deletion packages/spindle-ui/src/Button/Button.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { Description, Meta, Story, Source } from '@storybook/addon-docs/blocks';
import { actions } from '@storybook/addon-actions';
import { Button } from './Button';
import { PlusBold, Link, FileAdd, ChevronDownBold } from '../Icon';
import PlusBold from '../Icon/PlusBold';
import Link from '../Icon/Link';
import FileAdd from '../Icon/FileAdd';
import ChevronDownBold from '../Icon/ChevronDownBold';

# Button

Expand Down
2 changes: 1 addition & 1 deletion packages/spindle-ui/src/IconButton/IconButton.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Description, Meta, Story, Source } from '@storybook/addon-docs/blocks';
import { actions } from '@storybook/addon-actions';
import { IconButton } from './IconButton';
import { PlusBold } from '../Icon';
import PlusBold from '../Icon/PlusBold';

# IconButton
<Description>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import { useState } from 'react'
import { Meta, Story, Source } from '@storybook/addon-docs/blocks';
import { InlineNotification } from './InlineNotification';
import { Information, CheckCircleFill, Openblank, ExclamationmarkCircleFill, CrossBold } from '../Icon';
import Information from '../Icon/Information';
import CheckCircleFill from '../Icon/CheckCircleFill';
import Openblank from '../Icon/Openblank';
import ExclamationmarkCircleFill from '../Icon/ExclamationmarkCircleFill';
import CrossBold from '../Icon/CrossBold';
import {
VisiblePropsSample
} from './InlineNotification.stories.example';
Expand Down
9 changes: 8 additions & 1 deletion packages/spindle-ui/src/LinkButton/LinkButton.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
import { Description, Meta, Story, Source } from '@storybook/addon-docs/blocks';
import { actions } from '@storybook/addon-actions';
import { LinkButton } from './LinkButton';
import { PlusBold, ArrowRightBold, OpenblankFill, Link, GraphBar, Present, PencilAdd, ChevronDownBold } from '../Icon';
import PlusBold from '../Icon/PlusBold';
import ArrowRightBold from '../Icon/ArrowRightBold';
import OpenblankFill from '../Icon/OpenblankFill';
import Link from '../Icon/Link';
import GraphBar from '../Icon/GraphBar';
import Present from '../Icon/Present';
import PencilAdd from '../Icon/PencilAdd';
import ChevronDownBold from '../Icon/ChevronDownBold';

# LinkButton

Expand Down
8 changes: 3 additions & 5 deletions packages/spindle-ui/src/SnackBar/SnackBar.figma.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import React from 'react';
import { SnackBar } from './SnackBar';
import figma from '@figma/code-connect';
import {
CheckCircleFill,
ExclamationmarkCircleFill,
Information,
} from 'src/Icon';
import CheckCircleFill from 'src/Icon/CheckCircleFill'
import ExclamationmarkCircleFill from 'src/Icon/ExclamationmarkCircleFill'
import Information from 'src/Icon/Information'

figma.connect(
SnackBar,
Expand Down
6 changes: 5 additions & 1 deletion packages/spindle-ui/src/SnackBar/SnackBar.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ import { Description, Meta, Story, Source } from '@storybook/addon-docs/blocks';
import { actions } from '@storybook/addon-actions';
import { SnackBar } from './SnackBar';
import { Button } from '../Button';
import { Information, CheckCircleFill, Openblank, ExclamationmarkCircleFill } from '../Icon';
import Information from '../Icon/Information';
import CheckCircleFill from '../Icon/CheckCircleFill';
import Openblank from '../Icon/Openblank';
import ExclamationmarkCircleFill from '../Icon/ExclamationmarkCircleFill';


export const usePoliteAnnouncer = (message) => {
const announcer = useRef(null);
Expand Down
4 changes: 3 additions & 1 deletion packages/spindle-ui/src/TextButton/TextButton.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { Description, Meta, Story, Source } from '@storybook/addon-docs/blocks';
import { actions } from '@storybook/addon-actions';
import { TextButton } from './TextButton';
import { ChevronRightBold, CameraFill, PencilAdd } from '../Icon';
import ChevronRightBold from '../Icon/ChevronRightBold';
import CameraFill from '../Icon/CameraFill';
import PencilAdd from '../Icon/PencilAdd';

# TextButton

Expand Down
4 changes: 3 additions & 1 deletion packages/spindle-ui/src/TextLink/TextLink.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { Description, Meta, Story, Source } from '@storybook/addon-docs/blocks';
import { actions } from '@storybook/addon-actions';
import { TextLink } from './TextLink';
import { ChevronRightBold, CameraFill, PencilAdd } from '../Icon';
import ChevronRightBold from '../Icon/ChevronRightBold';
import CameraFill from '../Icon/CameraFill';
import PencilAdd from '../Icon/PencilAdd';

# TextLink

Expand Down
4 changes: 3 additions & 1 deletion packages/spindle-ui/src/Toast/Toast.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import { Description, Meta, Story, Source } from '@storybook/addon-docs/blocks';
import { actions } from '@storybook/addon-actions';
import { Toast } from './Toast';
import { Button } from '../Button';
import { Information, CheckCircleFill, ExclamationmarkCircleFill } from '../Icon';
import Information from '../Icon/Information';
import CheckCircleFill from '../Icon/CheckCircleFill';
import ExclamationmarkCircleFill from '../Icon/ExclamationmarkCircleFill';

export const usePoliteAnnouncer = (message) => {
const announcer = useRef(null);
Expand Down
Loading

0 comments on commit 9e99c9d

Please sign in to comment.