monday-ui-react-core
Version:
Official monday.com UI resources for application development in React.js
112 lines (76 loc) • 2.48 kB
text/mdx
import { Canvas, Meta } from "@storybook/blocks";
import { Link } from "vibe-storybook-components";
import Counter from "../Counter";
import { CHIP, LABEL, TOOLTIP } from "../../../storybook/components/related-components/component-description-map";
import { TipCheckYourself, Usage } from "./Counter.stories.helpers";
import * as CounterStories from "./Counter.stories";
<Meta of={CounterStories} />
- [Overview](
- [Props](
- [Usage](
- [Variants](
- [Do’s and don’ts](
- [Use cases and examples](
- [Related components](
- [Feedback](
Counters show the count of some adjacent data.
<Canvas of={CounterStories.Overview} />
<PropsTable />
<Usage />
<TipCheckYourself />
There are two sizes of counters
<Canvas of={CounterStories.Sizes} />
<Canvas of={CounterStories.Colors} />
<Canvas of={CounterStories.Outline} />
<Canvas of={CounterStories.Limits} />
<ComponentRules
rules={[
{
positive: {
component: <Counter count={15} />,
description: "Use counter to notify the number of items, such as notifications, updates, or inbox alerts."
},
negative: {
component: <Counter count="New" />,
description: (
<>
Don’t include any text. If you need a text label, use a{" "}
<StorybookLink page="Data display/Label">Label.</StorybookLink>
</>
)
}
},
{
positive: {
component: <Counter count={1000} />,
description: "Only use a maximum of 3 digits in a counter."
},
negative: {
component: <Counter count={1050} maxDigits={4} />,
description: "Don’t use more than 3 digits in a counter."
}
}
]}
/>
Used on the notification icon to indicate the number of new notifications.
<Canvas of={CounterStories.NotificationCounter} />
The counter represents the number of items on each topic.
<Canvas of={CounterStories.CounterOnInboxFilters} />
The counter represents the number of items on each topic.
<Canvas of={CounterStories.CountTheNumberOfUpdates} />
<RelatedComponents componentsNames={[LABEL, TOOLTIP, CHIP]} />