Skip to content

Instantly share code, notes, and snippets.

@johno
Last active March 6, 2018 17:29
Show Gist options
  • Save johno/122459bc76dd08c7d03b52135b57a7d8 to your computer and use it in GitHub Desktop.
Save johno/122459bc76dd08c7d03b52135b57a7d8 to your computer and use it in GitHub Desktop.
c8r/kit - A storybook alternative with a pure JSX/MDX API that interfaces with existing projects
import React from 'react'
import {
Provider,
Library,
Example,
Documentation,
Knobs,
contextTypes
} from '@compositor/kit'
import {
theme,
Input
} from './src'
import * as ui from './src'
import InputDocs from './docs/input.md'
export default () =>
<Provider
theme={{ theme }}
scope={ui}
>
<Library>
<Library.Nav />
<Example name='Input'>
<Knobs>
<Input placeholder='you@compositor.io' />
<Knobs.Input name='placeholder' />
<Knobs.Select name='has'>
<option></option>
<option>focus</option>
<option>error</option>
</Knobs.Select>
</Knobs>
<Documentation>
<InputDocs />
</Documentation>
</Example>
</Library>
</Provider>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment