1
0
mirror of https://gitlab.nic.cz/turris/reforis/foris-js.git synced 2024-11-14 17:35:35 +01:00
foris-js/src/bootstrap/CopyInput.md

18 lines
539 B
Markdown
Raw Normal View History

2022-04-13 15:50:08 +02:00
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
/>;
```