-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3011 from storybooks/eliminate-lint-warnings
Improve linting
- Loading branch information
Showing
144 changed files
with
579 additions
and
707 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
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,34 +1,17 @@ | ||
import React from 'react'; | ||
import { storiesOf } from '@storybook/react'; | ||
import Faker from 'faker'; | ||
|
||
import { checkA11y } from './../../../src'; | ||
|
||
import Button from './component'; | ||
|
||
import Faker from 'faker'; | ||
|
||
const text = Faker.lorem.words(); | ||
|
||
storiesOf('<Button />', module) | ||
.addDecorator(checkA11y) | ||
.add('Default', () => ( | ||
<Button /> | ||
)) | ||
.add('Content', () => ( | ||
<Button content={text} /> | ||
)) | ||
.add('Label', () => ( | ||
<Button label={text} /> | ||
)) | ||
.add('Disabled', () => ( | ||
<Button | ||
disabled | ||
content={text} | ||
/> | ||
)) | ||
.add('Invalid contrast', () => ( | ||
<Button | ||
contrast="wrong" | ||
content={Faker.lorem.words()} | ||
/> | ||
)); | ||
.add('Default', () => <Button />) | ||
.add('Content', () => <Button content={text} />) | ||
.add('Label', () => <Button label={text} />) | ||
.add('Disabled', () => <Button disabled content={text} />) | ||
.add('Invalid contrast', () => <Button contrast="wrong" content={Faker.lorem.words()} />); |
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,36 +1,20 @@ | ||
import React from 'react'; | ||
import { storiesOf } from '@storybook/react'; | ||
import Faker from 'faker'; | ||
|
||
import * as Form from './components'; | ||
|
||
import { storiesOf } from '@storybook/react'; | ||
import { checkA11y } from './../../../src'; | ||
|
||
import Faker from 'faker'; | ||
|
||
const label = Faker.lorem.word(); | ||
const placeholder = Faker.lorem.word(); | ||
|
||
storiesOf('<Form />', module) | ||
.addDecorator(checkA11y) | ||
.add('Without Label', () => ( | ||
<Form.Row | ||
input={<Form.Input />} | ||
/> | ||
)) | ||
.add ('With label', () => ( | ||
<Form.Row | ||
label={<Form.Label | ||
content={label} | ||
id="1" | ||
/>} | ||
input={<Form.Input id="1" />} | ||
/> | ||
)) | ||
.add ('With placeholder', () => ( | ||
<Form.Row | ||
input={<Form.Input | ||
id="1" | ||
placeholder={placeholder} | ||
/>} | ||
/> | ||
.add('Without Label', () => <Form.Row input={<Form.Input />} />) | ||
.add('With label', () => ( | ||
<Form.Row label={<Form.Label content={label} id="1" />} input={<Form.Input id="1" />} /> | ||
)) | ||
.add('With placeholder', () => ( | ||
<Form.Row input={<Form.Input id="1" placeholder={placeholder} />} /> | ||
)); |
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
Oops, something went wrong.