Skip to content

Commit 8ba0056

Browse files
canerakdasavivkeller
authored andcommitted
fix: wrong naming on signature stories
1 parent 82ac683 commit 8ba0056

File tree

1 file changed

+14
-20
lines changed

1 file changed

+14
-20
lines changed

packages/ui-components/src/Common/Signature/index.stories.tsx

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,38 @@
1-
import FunctionDefinition from '#ui/Common/Signature';
1+
import Signature from '#ui/Common/Signature';
22

33
import type { Meta as MetaObj, StoryObj } from '@storybook/react-webpack5';
44

5-
type Story = StoryObj<typeof FunctionDefinition>;
6-
type Meta = MetaObj<typeof FunctionDefinition>;
5+
type Story = StoryObj<typeof Signature>;
6+
type Meta = MetaObj<typeof Signature>;
77

88
export const Default: Story = {
99
args: {
1010
title: 'Attributes',
1111
children: (
1212
<>
13-
<FunctionDefinition
13+
<Signature
1414
name="attribute1"
1515
type={
1616
<>
1717
<a href="#">&lt;Type1&gt;</a>|<a href="#">&lt;Type2&gt;</a>
1818
</>
1919
}
2020
/>
21-
<FunctionDefinition
21+
<Signature
2222
name="attribute2"
2323
optional
2424
type={<a href="#">&lt;Object&gt;</a>}
2525
description="An optional attribute."
2626
>
27-
<FunctionDefinition
28-
name="option1"
29-
type={<a href="#">&lt;Type3&gt;</a>}
30-
/>
31-
<FunctionDefinition
32-
name="option2"
33-
type={<a href="#">&lt;Type3&gt;</a>}
34-
/>
35-
<FunctionDefinition
27+
<Signature name="option1" type={<a href="#">&lt;Type3&gt;</a>} />
28+
<Signature name="option2" type={<a href="#">&lt;Type3&gt;</a>} />
29+
<Signature
3630
name="option3"
3731
type={<a href="#">&lt;Type3&gt;</a>}
3832
description="One of the available options."
3933
/>
40-
</FunctionDefinition>
41-
<FunctionDefinition
34+
</Signature>
35+
<Signature
4236
name="Returns"
4337
type={<a href="#">&lt;Type4&gt;</a>}
4438
description="Returns the result of the function."
@@ -54,7 +48,7 @@ export const WithLongAttributeNames: Story = {
5448
title: 'Attributes',
5549
children: (
5650
<>
57-
<FunctionDefinition
51+
<Signature
5852
name="thisIsAnAttributeWithAnExcessivelyLongNameToTestTextWrapping"
5953
type={
6054
<>
@@ -72,7 +66,7 @@ export const WithLongTypeAndAttributeNames: Story = {
7266
title: 'Attributes',
7367
children: (
7468
<>
75-
<FunctionDefinition
69+
<Signature
7670
name="attribute1"
7771
type={
7872
<>
@@ -91,7 +85,7 @@ export const OptionalAttribute: Story = {
9185
args: {
9286
title: 'Attributes',
9387
children: (
94-
<FunctionDefinition
88+
<Signature
9589
name="optionalAttribute"
9690
optional
9791
type={<a href="#">&lt;Object&gt;</a>}
@@ -102,5 +96,5 @@ export const OptionalAttribute: Story = {
10296
};
10397

10498
export default {
105-
component: FunctionDefinition,
99+
component: Signature,
106100
} as Meta;

0 commit comments

Comments
 (0)