Devendra174's picture
Upload folder using huggingface_hub
1e92f2d verified
Raw History Blame Contribute Delete
545 Bytes
import { PureComponent } from 'react';
import ClipboardButton from '../';
export default class extends PureComponent {
static displayName = 'ClipboardButtons';
state = {
isCopied: false,
};
onCopy = () => {
this.setState( {
isCopied: true,
} );
};
render() {
return (
<div>
<ClipboardButton
onCopy={ this.onCopy }
text="This text was copied via ClipboardButton"
style={ { float: 'none' } }
>
{ this.state.isCopied ? 'Copied!' : 'Copy to clipboard' }
</ClipboardButton>
</div>
);
}
}