Sha256: c60dbc8a797ca7b48a0b2a8886bc9e8a3e08dda830ed1402d6919699449d2fb9
Contents?: true
Size: 984 Bytes
Versions: 124
Compression:
Stored size: 984 Bytes
Contents
import React, { useState } from 'react' import { CopyButton, Body, TextInput, Textarea } from 'playbook-ui' const CopyButtonFrom = (props) => { const [text, setText] = useState("Copy this text input text") const handleChange = (event) => { setText(event.target.value); } return (<div> <Body id="body">Copy this body text!</Body> <CopyButton {...props} from="body" marginBottom="sm" text="Copy Body text" tooltipPlacement="right" tooltipText="Body text copied!" /> <TextInput {...props} id="textinput" onChange={handleChange} value={text} /> <CopyButton {...props} from="textinput" marginBottom="sm" text="Copy Text Input" tooltipPlacement="right" tooltipText="Text input copied!" /> <Textarea {...props} placeholder="Copy and paste here" /> </div> ) } export default CopyButtonFrom
Version data entries
124 entries across 124 versions & 2 rubygems