From a4a7a3c8e707103e4886eef59a8a7a793214e229 Mon Sep 17 00:00:00 2001 From: unix Date: Fri, 27 Mar 2020 09:40:33 +0800 Subject: [PATCH] docs(badge): add component --- pages/docs/components/badge.mdx | 60 +++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 pages/docs/components/badge.mdx diff --git a/pages/docs/components/badge.mdx b/pages/docs/components/badge.mdx new file mode 100644 index 0000000..81b50d3 --- /dev/null +++ b/pages/docs/components/badge.mdx @@ -0,0 +1,60 @@ +import { Layout, Playground, Attributes } from 'lib/components' +import { Badge, Spacer } from 'components' + +export const meta = { + title: 'Badge', + description: 'Badge', +} + +## Badge + +Display an indicator that requires attention. + + + 1 + 50 + 100 + 2020 + +`} /> + + + Success + Warning + Error + Secondary + +`} /> + + + Mini + Small + Medium + Large + +`} /> + + + +Badge.Props + +| Attribute | Description | Type | Accepted values | Default +| ---------- | ---------- | ---- | -------------- | ------ | +| **type** | badge type | `NormalTypes` | `'default', 'secondary', 'success', 'warning', 'error'` | `default` | +| **size** | badge size | `NormalSizes` | `'mini', 'small', 'medium', 'large'` | `medium` | +| ... | native props | `HTMLAttributes` | `'alt', 'id', 'className', ...` | - | + + + +export default ({ children }) => {children}