mirror of https://github.com/grafana/grafana
Grafana-UI: Add docs for FormattedValueDisplay (#27759)
* Add docs for FormattedValueDisplay * Move to visualizationspull/27850/head
parent
244c28750c
commit
3188524f1f
@ -0,0 +1,14 @@ |
||||
import { Props } from '@storybook/addon-docs/blocks'; |
||||
import { FormattedValueDisplay } from './FormattedValueDisplay'; |
||||
|
||||
# FormattedValueDisplay |
||||
|
||||
Used to display a value, which also supports prefix and suffix. |
||||
### Usage |
||||
|
||||
```jsx |
||||
<FormattedValueDisplay value={{ text: 'Test value' }} style={{ fontSize: 12 }} /> |
||||
``` |
||||
|
||||
### Props |
||||
<Props of={FormattedValueDisplay} /> |
@ -0,0 +1,19 @@ |
||||
import React from 'react'; |
||||
import { FormattedValueDisplay } from './FormattedValueDisplay'; |
||||
import { withCenteredStory } from '@grafana/ui/src/utils/storybook/withCenteredStory'; |
||||
import mdx from './FormattedValueDisplay.mdx'; |
||||
|
||||
export default { |
||||
title: 'Visualizations/FormattedValueDisplay', |
||||
component: FormattedValueDisplay, |
||||
decorators: [withCenteredStory], |
||||
parameters: { |
||||
docs: { |
||||
page: mdx, |
||||
}, |
||||
}, |
||||
}; |
||||
|
||||
export const basic = () => { |
||||
return <FormattedValueDisplay value={{ text: 'Test value' }} style={{ fontSize: 12 }} />; |
||||
}; |
Loading…
Reference in new issue