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
  • Loading branch information
kc7891 committed Dec 4, 2024
1 parent 0eef78d commit 8329eb4
Show file tree
Hide file tree
Showing 14 changed files with 15 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useState, useRef } from 'react';
import { actions } from '@storybook/addon-actions';

import { Button } from '../Button';
import { AllFill } from '../Icon';
import AllFill from '../Icon/AllFill';
import { DropdownMenu } from './DropdownMenu';

export function Text() {
Expand Down
2 changes: 1 addition & 1 deletion packages/spindle-ui/src/Form/Checkbox.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { forwardRef } from 'react';

import { CheckBold } from '../Icon';
import CheckBold from '../Icon/CheckBold';

interface Props
extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'className'> {
Expand Down
2 changes: 1 addition & 1 deletion packages/spindle-ui/src/Form/DropDown.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { forwardRef, useEffect, useRef, useState } from 'react';
import mergeRefs from 'react-merge-refs';

import { ChevronDownBold } from '../Icon';
import ChevronDownBold from '../Icon/ChevronDownBold';

interface Props
extends Omit<React.SelectHTMLAttributes<HTMLSelectElement>, 'className'> {
Expand Down
2 changes: 1 addition & 1 deletion packages/spindle-ui/src/Form/InlineDropDown.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { forwardRef, useEffect, useRef, useState } from 'react';
import mergeRefs from 'react-merge-refs';

import { ChevronDownBold } from '../Icon';
import ChevronDownBold from '../Icon/ChevronDownBold';

type Size = 'medium' | 'small';

Expand Down
2 changes: 1 addition & 1 deletion packages/spindle-ui/src/Form/InvalidMessage.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';

import { ExclamationmarkCircleFill } from '../Icon';
import ExclamationmarkCircleFill from '../Icon/ExclamationmarkCircleFill';

interface Props
extends Omit<React.HTMLAttributes<HTMLParagraphElement>, 'className'> {
Expand Down
2 changes: 1 addition & 1 deletion packages/spindle-ui/src/Form/Radio.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { forwardRef } from 'react';

import { CheckBold } from '../Icon';
import CheckBold from '../Icon/CheckBold';

interface Props
extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'className'> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React from 'react';
import { InlineNotification } from './InlineNotification';
import figma from '@figma/code-connect';
import { CrossBold, Information } from 'src/Icon';
import CrossBold from 'src/Icon/CrossBold';
import Information from 'src/Icon/Information';

figma.connect(
InlineNotification,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { Button } from '../Button/Button';
import { Information } from '../Icon';
import Information from '../Icon/Information';
import { InlineNotification } from './InlineNotification';

export function VisiblePropsSample() {
Expand Down
2 changes: 1 addition & 1 deletion packages/spindle-ui/src/List/MoreLink.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { forwardRef } from 'react';
import { ChevronRightBold } from '../Icon';
import ChevronRightBold from '../Icon/ChevronRightBold';

interface Props
extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'className'> {
Expand Down
2 changes: 1 addition & 1 deletion packages/spindle-ui/src/Modal/AppealModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import React, {
} from 'react';
import mergeRefs from 'react-merge-refs';
import { ButtonGroup as Group } from '../ButtonGroup';
import { CrossBold } from '../Icon';
import CrossBold from '../Icon/CrossBold';
import { IconButton } from '../IconButton';
import { SubtleButton } from '../SubtleButton';

Expand Down
2 changes: 1 addition & 1 deletion packages/spindle-ui/src/Modal/SemiModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import React, {
useState,
} from 'react';
import mergeRefs from 'react-merge-refs';
import { CrossBold } from '../Icon';
import CrossBold from '../Icon/CrossBold';
import { IconButton } from '../IconButton';

type Size = 'large' | 'medium' | 'small';
Expand Down
2 changes: 1 addition & 1 deletion packages/spindle-ui/src/SnackBar/SnackBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import React, {
useMemo,
} from 'react';
import { useStackNotificationComponent } from '../StackNotificationManager';
import { CrossBold } from '../Icon';
import CrossBold from '../Icon/CrossBold';
import { IconButton } from '../IconButton';
import { TextLink as SpindleTextLink } from '../TextLink/TextLink';
import { TextButton as SpindleTextButton } from '../TextButton/TextButton';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
StackPosition,
} from './StackNotificationManager';
import { Button } from '../Button';
import { Information } from '../Icon';
import Information from '../Icon/Information';
import { useRepeatedStackItem } from './hooks';

const usePoliteAnnouncer = (active: boolean, message: string) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/spindle-ui/src/Toast/Toast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
ManagedStack,
useStackNotificationComponent,
} from '../StackNotificationManager';
import { CrossBold } from '../Icon';
import CrossBold from '../Icon/CrossBold';
import { IconButton } from '../IconButton';
import { StackNotificationComponentProps } from '../StackNotificationManager/StackNotificationManager';

Expand Down

0 comments on commit 8329eb4

Please sign in to comment.