Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Field options #5

Merged
merged 8 commits into from
Oct 3, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ npm-debug.log
node_modules/
bower_components/
testBundle.js
docs/build
docgenInfo.json
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@
npm i stardust -S
```

## Commands
## Develop

### Commands

```
npm run # list npm commands
gulp help # list npm commands
```

### Deploying

Expand Down
19 changes: 0 additions & 19 deletions components/Field/Field.js

This file was deleted.

43 changes: 0 additions & 43 deletions components/Grid/Column.js

This file was deleted.

10 changes: 10 additions & 0 deletions dev-env.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
var host = 'localhost';
var port = '8080';
var protocol = 'http';

module.exports = {
host: host,
port: port,
protocol: protocol,
serverUrl: protocol + '://' + host + ':' + port
};
24 changes: 21 additions & 3 deletions docs/app/Component/ComponentList.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,37 @@
import _ from 'lodash';
import React, {Component} from 'react';
import Button from 'src/components/Button/Button';

import docgenInfo from './../docgenInfo';
import ComponentDescription from './ComponentDescription';
import ComponentExamples from './ComponentExamples';
import ComponentProps from './ComponentProps';

/**
* A list of Components' documentation.
*/
class ComponentList extends Component {
state = {
showDocgenJSON: false
};

toggleShowDocgenJSON = () => {
this.setState({
showDocgenJSON: !this.state.showDocgenJSON
});
};

render() {
let components = _.map(docgenInfo, (val, key) => {
var filename = key.substr(key.lastIndexOf('/') + 1).replace(/\.js$/, '');
var examples = _.map(_.filter(val.docBlock.tags, {title: 'example'}), 'description');

var docgenJSON = (
<div>
<div className='ui divider' />
<pre>{JSON.stringify(val, null, 2)}</pre>
</div>
);

return (
<div key={key} className='ui segment'>
<h2 className='ui header'>
Expand All @@ -29,8 +46,9 @@ class ComponentList extends Component {
<h3>Props:</h3>
<ComponentProps props={val.props} />

<div className='ui divider' />
<pre>{JSON.stringify(val, null, 2)}</pre>
<Button onClick={this.toggleShowDocgenJSON}>JSON</Button>

{this.state.showDocgenJSON && docgenJSON}
</div>
);
});
Expand Down
Loading