mirror of
https://gitlab.nic.cz/turris/reforis/foris-js.git
synced 2025-06-16 13:46:16 +02:00
Add CopyInput bootstrap component
This commit is contained in:
17
src/bootstrap/CopyInput.md
Normal file
17
src/bootstrap/CopyInput.md
Normal file
@ -0,0 +1,17 @@
|
||||
CopyInput Bootstrap component contains input with a label, predefined sizes, and
|
||||
structure for use in ForisForm and the "Copy" button (copy to clipboard). It can
|
||||
be used with `readOnly` and `disabled` parameters, please see an example.
|
||||
|
||||
All additional `props` are passed to the `<input type="text">` HTML component.
|
||||
|
||||
```js
|
||||
import React, { useState } from "react";
|
||||
const [value, setValue] = useState("Text to appear in clipboard.");
|
||||
|
||||
<CopyInput
|
||||
label="Copy me"
|
||||
value={value}
|
||||
helpText="Read the small text!"
|
||||
readOnly
|
||||
/>;
|
||||
```
|
Reference in New Issue
Block a user