Commit 84bf9470 by Oana Mangiurea Committed by GitHub

Created Legend.mdx (#26146)

Add simple docs to legend component

Signed-off-by: Oana <oana.mangiurea@gmail.com>
parent 14209c0e
import { Story, Preview, Props } from '@storybook/addon-docs/blocks';
import { Legend } from './Legend';
<Meta title="MDX|Legend" component={Legend} />
# Legend
### When to use
Legend should be used to add a caption to a group of related form elements that have been grouped toegheter into a `FieldSet`.
### Usage
```jsx
import { Forms } from '@grafana/ui';
<Legend>{label}</Legend>
```
### Props
<Props of={Legend} />
......@@ -2,6 +2,7 @@ import React from 'react';
import { text } from '@storybook/addon-knobs';
import { Legend } from './Legend';
import mdx from './Legend.mdx';
const getKnobs = () => {
return {
......@@ -12,6 +13,11 @@ const getKnobs = () => {
export default {
title: 'Forms/Legend',
component: Legend,
parameters: {
docs: {
page: mdx,
},
},
};
export const basic = () => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment