-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(template): update yarn new (#1080)
* chore(template): update yarn new * Return promises for Promise.all
- Loading branch information
Showing
6 changed files
with
132 additions
and
57 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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { Meta, Description } from '@storybook/addon-docs/blocks'; | ||
import README from '../README.md'; | ||
|
||
<Meta title="Components/{{componentName}}/README" /> | ||
|
||
<Description>{README}</Description> |
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 |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/** | ||
* Copyright Zendesk, Inc. | ||
* | ||
* Use of this source code is governed under the Apache License, Version 2.0 | ||
* found at http://www.apache.org/licenses/LICENSE-2.0. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { Story, Meta } from '@storybook/react'; | ||
import { Grid, Row, Col } from '@zendeskgarden/react-grid'; | ||
import { Well } from '@zendeskgarden/react-notifications'; | ||
import { Toggle, Field, Input, Label } from '@zendeskgarden/react-forms'; | ||
import { Example } from '@zendeskgarden/react-{{component}}'; | ||
|
||
export default { | ||
title: 'Components/{{componentName}}/Example', | ||
component: Example | ||
} as Meta; | ||
|
||
export const Default: Story = () => { | ||
const [compact, setCompact] = React.useState(false); | ||
const [text, setText] = React.useState(''); | ||
|
||
const style = { width: 300 }; | ||
|
||
return ( | ||
<Grid> | ||
<Row> | ||
<Col> | ||
<Well isRecessed style={style}> | ||
<Field> | ||
<Label>Text</Label> | ||
<Input isCompact value={text} onChange={event => setText(event.target.value)} /> | ||
</Field> | ||
<Field className="u-mt-xs"> | ||
<Toggle checked={compact} onChange={event => setCompact(event.target.checked)}> | ||
<Label>Compact</Label> | ||
</Toggle> | ||
</Field> | ||
</Well> | ||
</Col> | ||
<Col> | ||
<Example isCompact={compact}> | ||
<span>{text}</span> | ||
</Example> | ||
</Col> | ||
</Row> | ||
</Grid> | ||
); | ||
}; | ||
|
||
Default.parameters = { | ||
docs: { | ||
description: { | ||
component: ` | ||
A description of the {{component}} component. | ||
` | ||
} | ||
} | ||
}; |
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