11import type { Meta , StoryObj } from '@storybook/react-vite' ;
2- import BreakLines from '../../src/components/BreakLines' ;
2+ import BreakLines , { type BreakLinesProps } from '../../src/components/BreakLines' ;
33
44const meta : Meta < typeof BreakLines > = {
55 title : 'Components/BreakLines' ,
@@ -10,49 +10,49 @@ const meta: Meta<typeof BreakLines> = {
1010 EOL : '\n' ,
1111 tagName : 'div' ,
1212 className : '' ,
13- } ,
13+ } satisfies Partial < BreakLinesProps > ,
1414 argTypes : {
15- value : {
16- control : 'text' ,
17- description : `- **EN:** Text content
18- - **CN:** 文本内容` ,
19- table : {
20- defaultValue : { summary : '第一行\\n第二行\\n第三行(demo)' } ,
21- } ,
22- } ,
23- enabled : {
24- control : 'boolean' ,
25- description : `- **EN:** Whether the line break conversion is enabled.
26- - **CN:** 是否启用换行转换。` ,
27- table : {
28- defaultValue : { summary : 'true' } ,
29- } ,
30- } ,
31- EOL : {
32- control : 'text' ,
33- description : `- **EN:** The end-of-line character to use for splitting lines.
34- - **CN:** 用于分割行的行结束字符。` ,
35- table : {
36- defaultValue : { summary : '\\n' } ,
37- } ,
38- } ,
39- tagName : {
40- control : 'select' ,
41- options : [ false , 'span' , 'div' , 'i' , 'pre' ] ,
42- description : `- **EN:** The HTML tag to use for rendering the content.
43- - **CN:** 用于渲染内容的 HTML 标签。` ,
44- table : {
45- defaultValue : { summary : 'false(组件默认) / div(demo)' } ,
46- } ,
47- } ,
48- className : {
49- control : 'text' ,
50- description : `- **EN:** The CSS class name of the dom node, if \`tagName\` is set to false, this property is invalid.
51- - **CN:** dom 节点的 css 类名,如果 \`tagName\` 设置为 false,则此属性无效。` ,
52- table : {
53- defaultValue : { summary : '""(demo)' } ,
54- } ,
55- } ,
15+ // value: {
16+ // control: 'text',
17+ // description: `- **EN:** Text content
18+ // - **CN:** 文本内容`,
19+ // table: {
20+ // defaultValue: { summary: '第一行\\n第二行\\n第三行(demo)' },
21+ // },
22+ // },
23+ // enabled: {
24+ // control: 'boolean',
25+ // description: `- **EN:** Whether the line break conversion is enabled.
26+ // - **CN:** 是否启用换行转换。`,
27+ // table: {
28+ // defaultValue: { summary: 'true' },
29+ // },
30+ // },
31+ // EOL: {
32+ // control: 'text',
33+ // description: `- **EN:** The end-of-line character to use for splitting lines.
34+ // - **CN:** 用于分割行的行结束字符。`,
35+ // table: {
36+ // defaultValue: { summary: '\\n' },
37+ // },
38+ // },
39+ // tagName: {
40+ // control: 'select',
41+ // options: [false, 'span', 'div', 'i', 'pre'],
42+ // description: `- **EN:** The HTML tag to use for rendering the content.
43+ // - **CN:** 用于渲染内容的 HTML 标签。`,
44+ // table: {
45+ // defaultValue: { summary: 'false(组件默认) / div(demo)' },
46+ // },
47+ // },
48+ // className: {
49+ // control: 'text',
50+ // description: `- **EN:** The CSS class name of the dom node, if \`tagName\` is set to false, this property is invalid.
51+ // - **CN:** dom 节点的 css 类名,如果 \`tagName\` 设置为 false,则此属性无效。`,
52+ // table: {
53+ // defaultValue: { summary: '""(demo)' },
54+ // },
55+ // },
5656 } ,
5757} ;
5858
0 commit comments