React UI Components used in Buttercup product series.
npm install
npm run storybook
Then head to http://localhost:6006/.
yarn add @buttercup/ui
# or
npm install @buttercup/ui --save
import { Button } from '@buttercup/ui';
const MyComponent = () => (
<Button danger>Delete</Button>
);
The password generator comes bundled in a popover, which can be used like so:
import { Generator } from "@buttercup/ui";
const Comp = () => (
<Generator
onGenerate={handleGenerated}
isOpen={isOpen}
>
<div>
<Button onClick={toggleGenerator}>
Generate Password
</Button>
</div>
</Generator>
);
If you just require the body of the generator, you can import GeneratorUserInterface
instead.
The indicator can be used like so:
import { Meter } from "@buttercup/ui";
const Comp = () => (
<Meter input={inputValue} />
);
Available as Button
.
TBA.
Available as Input
.
TBA.
Available as Center
.
TBA.
Available as SmallType
.
TBA.
Run npm t
to execute the tests.
To update component snapshots run npm run test:updateSnapshots
.