Skip to content

Commit

Permalink
Temporarily fixes problematic stories (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
jlsnow301 authored Nov 23, 2024
1 parent 481e964 commit 8e8bbf7
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 42 deletions.
2 changes: 2 additions & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { Preview } from '@storybook/react';
import 'tgui-styles';
import '../stories/assets/fonts.css';
import '../stories/assets/all.min.css';
import { withConsole } from '@storybook/addon-console';

const preview: Preview = {
parameters: {
Expand All @@ -16,6 +17,7 @@ const preview: Preview = {
},
},
},
decorators: [(storyFn, context) => withConsole()(storyFn)(context)],
};

export default preview;
4 changes: 2 additions & 2 deletions lib/components/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ type Props = {
/** Custom CSS. */
style: CSSProperties;
}> &
BoxProps;
Omit<BoxProps, 'children'>;

const FA_OUTLINE_REGEX = /-o$/;

export function Icon(props: Props) {
const { name, size, spin, className, rotation, ...rest } = props;
const { name = '', size, spin, className, rotation, ...rest } = props;

const customStyle = rest.style || {};
if (size) {
Expand Down
18 changes: 0 additions & 18 deletions stories/DraggableControl.stories.tsx

This file was deleted.

4 changes: 2 additions & 2 deletions stories/Icon.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Meta, StoryObj } from '@storybook/react';
import { Icon } from 'lib/components';
import type { ComponentProps } from 'react';
import { Icon } from '../lib/components/Icon';

type StoryProps = ComponentProps<typeof Icon>;

Expand All @@ -13,6 +13,6 @@ type Story = StoryObj<StoryProps>;

export const Default: Story = {
args: {
children: 'Icon',
name: 'question',
},
};
18 changes: 0 additions & 18 deletions stories/Image.stories.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions stories/Input.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { withConsole } from '@storybook/addon-console';
import type { Meta, StoryObj } from '@storybook/react';
import type { ComponentProps } from 'react';
import { Input } from '../lib/components/Input';
Expand All @@ -8,7 +7,6 @@ type StoryProps = ComponentProps<typeof Input>;
export default {
component: Input,
title: 'Components/Input',
decorators: [(storyFn, context) => withConsole()(storyFn)(context)],
} satisfies Meta<StoryProps>;

type Story = StoryObj<StoryProps>;
Expand Down

0 comments on commit 8e8bbf7

Please sign in to comment.