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
2022-05-19 15:56:10 +02:00

539 B

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.

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
/>;