mirror of https://github.com/grafana/grafana
Chore: Improve SecretInput story (#51665)
* Added mdx file for secret input * Chore: Improve SecretInput story * review related changes in docs Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>pull/51201/head
parent
f78b7f1f17
commit
920bd1e88d
@ -0,0 +1,28 @@ |
||||
import { Props } from '@storybook/addon-docs/blocks'; |
||||
import { SecretInput } from './SecretInput'; |
||||
|
||||
# Secret Input |
||||
|
||||
Used for secret/password input. It has 2 states: **_configured_** and **_not configured_**. |
||||
|
||||
- If configured it will disable the input and add a reset button that will |
||||
clear the input and make it accessible. |
||||
- In non configured state it behaves like a normal password input. |
||||
|
||||
This is used for passwords or anything that is encrypted on the server and is |
||||
later returned encrypted to the user (like datasource passwords). |
||||
|
||||
### Usage |
||||
|
||||
```tsx |
||||
import {SecretInput} from '@grafana/ui'; |
||||
|
||||
<SecretInput |
||||
value={...} |
||||
isConfigured={...} |
||||
onChange={...} |
||||
onReset={...} |
||||
/> |
||||
``` |
||||
|
||||
<Props of={SecretInput} /> |
Loading…
Reference in new issue