No Preview

Sorry, but you either have no stories or none are selected somehow.

If the problem persists, check the browser console, or the terminal you've run Storybook from.

Pill

import { Pill } from '@proton/atoms';

This is a generic Pill component which accepts a color and a backgroundColor. If one of the colors is given, the other color will be generated automatically. If both colors are given, they will be used as they are. If no color is set, the default color is used.

Default color

Text
() => <Pill>Text</Pill>

Color is set, backgroundColor is generated

Text
() => <Pill color="#aa0867">Text</Pill>

BackgroundColor is set, color is generated

Text
() => <Pill backgroundColor="#d2ffcc">Text</Pill>

Both colors are set

Text
() => ( <Pill color="#b90404" backgroundColor="#fff2b3"> Text </Pill> )

Sandbox

Try out different colors. A warning will be given when the color contrast is too low.

Text

Text contrast good

Color
Background Color

Props

No inputs found for this component. Read the docs