c8r / kit Goto Github PK
View Code? Open in Web Editor NEWTools for developing, documenting, and testing React component libraries
Home Page: https://compositor.io/kit
License: MIT License
Tools for developing, documenting, and testing React component libraries
Home Page: https://compositor.io/kit
License: MIT License
This will allow being able to override a single component.
Currently this works, however the preview is understandably a bit broken. I'm wondering if perhaps we offer an optional Preview
component?:
import {
Provider,
Library,
Example,
Preview,
Knobs
} from '@compositor/kit'
import Doc from '../docs/components/Button.md'
import { Button } from './ui'
export default () =>
<Provider>
<Library>
<Library.Nav />
<Example name='Button'>
<Preview>
<Button>Button</Button>
</Preview>
<Doc />
<Knobs>
<Button size='normal'>Hello</Button>
<Knobs.Input name='children' />
<Knobs.Select name='size'>
<option></option>
<option>small</option>
<option>normal</option>
<option>large</option>
</Knobs.Select>
</Knobs>
</Example>
</Library>
</Provider>
In this example, only Preview
is rendered in the library view, and the remainder is rendered in the component view.
Option to output a cut and paste-able version with html + atomic css based on the theme.
For more in-depth discussion around #73 and subsequent CLI PRs:
The heavy lifting of the CLI should live in logical, separate packages in the packages
dir. This will allow for the libraries to be used for other usecases and app contexts. The cli
dir in root will server more as the UI for the CLI itself.
~/c/c8r/styleguide rewrite* 1m 30s
❯ rm -rf out && ./dist/cli.js docs/components -d out && superstatic out
styleguide @compositor/styleguide
Error parsing component metadata for docs/components/Box.md
Processed docs/components/Box.md
Error parsing component metadata for docs/components/Flex.md
Processed docs/components/Flex.md
Warning: Unsupported vendor-prefixed style property webkitTextDecoration. Did you mean WebkitTextDecoration?
Warning: Unsupported vendor-prefixed style property webkitAppearance. Did you mean WebkitAppearance?
Warning: Unsupported vendor-prefixed style property mozAppearance. Did you mean MozAppearance?
Warning: Unsupported vendor-prefixed style property webkitTextTransform. Did you mean WebkitTextTransform?
./library/NavLink.js: webkitTextDecoration: 'none',
./library/Button.js: webkitTextDecoration: 'none',
./library/FormButton.js: webkitTextDecoration: 'none',
As discussed, it might make sense for styleguide and my idea for a devkit to be combined into a single library of components for development, documentation, and demos.
Some of the components below would also be useful for building features into the apps and for other potential libraries, like an automatic style guide generator.
Some of the potential components I was thinking of include:
* already in styleguide
This will allow you to render a component on mobile/tablet/desktop (scaled).
This will display html/css code rather than the jsx
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.