Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
docs: 优化组件文档,可以在storybook上直接编辑属性
- Loading branch information
1 parent
2f7ec98
commit 8f4cb81
Showing
16 changed files
with
76 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import '@storybook/addon-actions/register'; | ||
// import '@storybook/addon-actions/register'; | ||
import '@storybook/addon-knobs/register'; | ||
import '@storybook/addon-notes/register'; | ||
import '@storybook/addon-storysource/register'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
import React from 'react'; | ||
import { storiesOf } from '@storybook/react'; | ||
import { withKnobs } from '@storybook/addon-knobs'; | ||
import { withKnobs , text } from '@storybook/addon-knobs'; | ||
import { CommonLoading } from '~/components'; | ||
import Container from './compoment/Container'; | ||
storiesOf('CommonLoading', module) | ||
.addDecorator(withKnobs) | ||
.add('CommonLoading', () => { | ||
let color = ''; | ||
color = text('颜色') | ||
return ( | ||
<Container> | ||
<CommonLoading style={{ margin: "100px 60px" }}></CommonLoading> | ||
<CommonLoading color={color} style={{ margin: "100px 60px" }}></CommonLoading> | ||
</Container> | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
import React from 'react'; | ||
import { storiesOf } from '@storybook/react'; | ||
import { withKnobs } from '@storybook/addon-knobs'; | ||
import { withKnobs, number, text } from '@storybook/addon-knobs'; | ||
import { DisappearedLoading } from '~/components'; | ||
import Container from './compoment/Container'; | ||
storiesOf('DisappearedLoading', module) | ||
.addDecorator(withKnobs) | ||
.add('DisappearedLoading', () => { | ||
let speed = 1; | ||
let color = ''; | ||
speed = number('动画速度(s)') | ||
color = text('颜色') | ||
return ( | ||
<Container> | ||
<DisappearedLoading style={{ margin: "100px 60px" }}></DisappearedLoading> | ||
<DisappearedLoading speed={speed} color={color} style={{ margin: "100px 60px" }}></DisappearedLoading> | ||
</Container> | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
import React from 'react'; | ||
import { storiesOf } from '@storybook/react'; | ||
import { withKnobs } from '@storybook/addon-knobs'; | ||
import { withKnobs, text } from '@storybook/addon-knobs'; | ||
import { LoopCircleLoading } from '~/components'; | ||
import Container from './compoment/Container'; | ||
storiesOf('LoopCircleLoading', module) | ||
.addDecorator(withKnobs) | ||
.add('LoopCircleLoading', () => { | ||
let color = ''; | ||
color = text('颜色') | ||
return ( | ||
<Container> | ||
<LoopCircleLoading style={{ margin: "100px 60px" }}></LoopCircleLoading> | ||
<LoopCircleLoading color={color} style={{ margin: "100px 60px" }}></LoopCircleLoading> | ||
</Container> | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
import React from 'react'; | ||
import { storiesOf } from '@storybook/react'; | ||
import { withKnobs } from '@storybook/addon-knobs'; | ||
import { withKnobs, number, text } from '@storybook/addon-knobs'; | ||
import { TouchBallLoading } from '~/components'; | ||
import Container from './compoment/Container'; | ||
storiesOf('TouchBallLoading', module) | ||
.addDecorator(withKnobs) | ||
.add('TouchBallLoading', () => { | ||
let speed = 1; | ||
let color = ''; | ||
speed = number('动画速度(s)') | ||
color = text('颜色') | ||
return ( | ||
<Container> | ||
<TouchBallLoading style={{ width: 100, height: 100 }} speed={1}></TouchBallLoading> | ||
<TouchBallLoading speed={speed} color={color} style={{ width: 100, height: 100 }} speed={1}></TouchBallLoading> | ||
</Container> | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
import React from 'react'; | ||
import { storiesOf } from '@storybook/react'; | ||
import { withKnobs } from '@storybook/addon-knobs'; | ||
import { withKnobs, text } from '@storybook/addon-knobs'; | ||
import { TransverseLoading } from '~/components'; | ||
import Container from './compoment/Container'; | ||
storiesOf('TransverseLoading', module) | ||
.addDecorator(withKnobs) | ||
.add('TransverseLoading', () => { | ||
let color = ''; | ||
color = text('颜色') | ||
return ( | ||
<Container> | ||
<TransverseLoading style={{ margin: "100px 60px" }}></TransverseLoading> | ||
<TransverseLoading color={color} style={{ margin: "100px 60px" }}></TransverseLoading> | ||
</Container> | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
import React from 'react'; | ||
import { storiesOf } from '@storybook/react'; | ||
import { withKnobs } from '@storybook/addon-knobs'; | ||
import { withKnobs, text } from '@storybook/addon-knobs'; | ||
import { WaveLoading } from '~/components'; | ||
import Container from './compoment/Container'; | ||
storiesOf('WaveLoading', module) | ||
.addDecorator(withKnobs) | ||
.add('WaveLoading', () => { | ||
let color = ''; | ||
color = text('颜色') | ||
return ( | ||
<Container> | ||
<WaveLoading style={{ margin: "100px 60px" }}></WaveLoading> | ||
<WaveLoading color={color} style={{ margin: "100px 60px" }}></WaveLoading> | ||
</Container> | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
import React from 'react'; | ||
import { storiesOf } from '@storybook/react'; | ||
import { withKnobs } from '@storybook/addon-knobs'; | ||
import { withKnobs, text, number } from '@storybook/addon-knobs'; | ||
import { WaveTopBottomLoading } from '~/components'; | ||
import Container from './compoment/Container'; | ||
storiesOf('WaveTopBottomLoading', module) | ||
.addDecorator(withKnobs) | ||
.add('WaveTopBottomLoading', () => { | ||
let speed = 1; | ||
let color = ''; | ||
speed = number('动画速度(s)') | ||
color = text('颜色') | ||
return ( | ||
<Container> | ||
<WaveTopBottomLoading style={{ margin: "100px 60px" }}></WaveTopBottomLoading> | ||
<WaveTopBottomLoading speed={speed} color={color} style={{ margin: "100px 60px" }}></WaveTopBottomLoading> | ||
</Container> | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
import React from 'react'; | ||
import { storiesOf } from '@storybook/react'; | ||
import { withKnobs } from '@storybook/addon-knobs'; | ||
import { withKnobs, text, number } from '@storybook/addon-knobs'; | ||
import { WindMillLoading } from '~/components'; | ||
import Container from './compoment/Container'; | ||
storiesOf('WindMillLoading', module) | ||
.addDecorator(withKnobs) | ||
.add('WindMillLoading', () => { | ||
let speed = 1; | ||
let color = ''; | ||
speed = number('动画速度(s)') | ||
color = text('颜色') | ||
return ( | ||
<Container> | ||
<WindMillLoading></WindMillLoading> | ||
<WindMillLoading speed={speed} color={color}></WindMillLoading> | ||
</Container> | ||
); | ||
}); |