UNPKG

bio-dark-midnight-theme

Version:

A super-cool dark theme for VS Code by studio.bio inspired by Oceanic Next and Solarized Dark. Optimized for JavaScript (React), PHP, HTML, and Sass/SCSS.

38 lines (33 loc) 852 B
// I use this syntax when my component fits on one line const ListItem = props => <li className="list-item">{props.item.name}</li> // I use this when my component has no logic outside JSX const List = ({ items }) => ( <ul className="list"> {items.map(item => ( <ListItem item={item} /> ))} </ul> ) // I use this when the component needs logic outside JSX. const Body = props => { let items = transformItems(props.rawItems) return ( <div> <h1>{props.header}</h1> <List items={items} /> </div> ) } // This is equivalent to the last example function Page(props, context) { return ( <div> <Body header="My List" rawItems={props.rawItems} /> </div> ) } // propTypes and contextTypes are supported Page.propTypes = { rawItems: React.PropTypes.array.isRequired } private static function()