@britannica/ui
v1.20.4
Published
Consumer style system
Downloads
910
Readme
@britannica/ui
Consumer style system and React component library
Storybook: https://britannica.github.io/consumer-ui
Installation and Basic Usage
npm install @britannica/ui
Include the CSS
Via JavaScript:
// Your app's main application file. e.g. index.js or App.js
import '@britannica/ui/dist/britannica-ui.css';
Via CSS:
@import '~@britannica/ui/dist/britannica-ui.css';
Via HTML:
<!-- You can specify a specific version -->
<link href="https://unpkg.com/@britannica/[email protected]/dist/britannica-ui.css" rel="stylesheet" />
<!-- Or if you always want the latest -->
<link href="https://unpkg.com/@britannica/ui@latest/dist/britannica-ui.css" rel="stylesheet" />
Note: More documentation is on the way, but for now we recommend looking at a couple different places for relevant style information:
Import a component
import { Button } from '@britannica/ui';
const MyComponent = () => <Button label="Enable Bat-Signal">Enable Bat-Signal</Button>;
Note: More documentation is on the way, but for now we recommend looking at the propTypes
within each of the components to see which components exist as well as which props they accept.
testing