Skip to content

Commit 4ec664e

Browse files
authored
Merge pull request #166 from mashmatrix/examples-to-storybook
Moving examples to stories
2 parents f02e334 + ba4177e commit 4ec664e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+2523
-5502
lines changed

.storybook/head.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
</script>
1212
<style>
1313
body {
14-
padding: 8px 56px 8px 8px;
14+
padding: 16px 56px 16px 16px;
1515
}
1616
</style>

README.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@ $ npm install react-lightning-design-system
1616

1717
```javascript
1818
import React from 'react';
19+
import ReactDOM from 'react-dom';
1920
import { Button } from 'react-lightning-design-system';
2021

2122
function click() { alert('Clicked'); }
2223

23-
React.render(
24+
ReactDOM.render(
2425
<div>
2526
<Button onClick={ click }>Simple</Button>
2627
<Button type='neutral' onClick={ click }>Neutral</Button>
@@ -32,16 +33,14 @@ React.render(
3233
, document.body);
3334
```
3435

35-
See more examples in [examples](https://github.com/mashmatrix/react-lightning-design-system/tree/master/examples) directory.
36+
See more examples in [examples](https://github.com/mashmatrix/react-lightning-design-system/tree/master/stories) directory.
3637

3738

38-
## Running examples locally
39+
## Running example stories locally
3940

40-
This repo ships with a simple Express app which serves up examples of the components on ```http://localhost:3000```. To get that running follow these steps:
41+
This repo ships with a react storybook based story scripts.
42+
To run stories and get component examples, follow these steps:
4143

42-
1. run ```npm install``` and ```npm run build``` in this repo's root directory.
43-
2. ```cd examples```
44-
3. In the examples directory run:
45-
* ```npm install```
46-
* ```npm start```
47-
4. Find the examples running on [localhost:3000](http://localhost:3000).
44+
1. run ```npm install```
45+
2. run ```npm run storybook```
46+
3. Find the stories running on [localhost:9001](http://localhost:9001).

examples/.eslintrc

Lines changed: 0 additions & 7 deletions
This file was deleted.

examples/.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

examples/client/scripts/components/BadgeExamples.js

Lines changed: 0 additions & 15 deletions
This file was deleted.

examples/client/scripts/components/BreadCrumbsExamples.js

Lines changed: 0 additions & 15 deletions
This file was deleted.

examples/client/scripts/components/ButtonExamples.js

Lines changed: 0 additions & 75 deletions
This file was deleted.

examples/client/scripts/components/ButtonGroupExamples.js

Lines changed: 0 additions & 34 deletions
This file was deleted.

examples/client/scripts/components/CardExamples.js

Lines changed: 0 additions & 43 deletions
This file was deleted.

examples/client/scripts/components/DatepickerExamples.js

Lines changed: 0 additions & 87 deletions
This file was deleted.

0 commit comments

Comments
 (0)