mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Grafana-UI: Add docs for FormattedValueDisplay (#27759)
* Add docs for FormattedValueDisplay * Move to visualizations
This commit is contained in:
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
Block a user