1- import FunctionDefinition from '#ui/Common/Signature' ;
1+ import Signature from '#ui/Common/Signature' ;
22
33import 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
88export const Default : Story = {
99 args : {
1010 title : 'Attributes' ,
1111 children : (
1212 < >
13- < FunctionDefinition
13+ < Signature
1414 name = "attribute1"
1515 type = {
1616 < >
1717 < a href = "#" > <Type1></ a > |< a href = "#" > <Type2></ a >
1818 </ >
1919 }
2020 />
21- < FunctionDefinition
21+ < Signature
2222 name = "attribute2"
2323 optional
2424 type = { < a href = "#" > <Object></ a > }
2525 description = "An optional attribute."
2626 >
27- < FunctionDefinition
28- name = "option1"
29- type = { < a href = "#" > <Type3></ a > }
30- />
31- < FunctionDefinition
32- name = "option2"
33- type = { < a href = "#" > <Type3></ a > }
34- />
35- < FunctionDefinition
27+ < Signature name = "option1" type = { < a href = "#" > <Type3></ a > } />
28+ < Signature name = "option2" type = { < a href = "#" > <Type3></ a > } />
29+ < Signature
3630 name = "option3"
3731 type = { < a href = "#" > <Type3></ a > }
3832 description = "One of the available options."
3933 />
40- </ FunctionDefinition >
41- < FunctionDefinition
34+ </ Signature >
35+ < Signature
4236 name = "Returns"
4337 type = { < a href = "#" > <Type4></ 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 = "#" > <Object></ a > }
@@ -102,5 +96,5 @@ export const OptionalAttribute: Story = {
10296} ;
10397
10498export default {
105- component : FunctionDefinition ,
99+ component : Signature ,
106100} as Meta ;
0 commit comments