Copyable
View on MongoDB.design
Installation
PNPM
pnpm add @leafygreen-ui/copyable
Yarn
yarn add @leafygreen-ui/copyable
NPM
npm install @leafygreen-ui/copyable
Example
<Copyable label="Label" description="Description">
{'npm install @leafygreen-ui/copyable'}
</Copyable>
Properties
| Prop | Type | Description | Default |
|---|---|---|---|
label |
string |
Label text for the copyable contents. | |
description |
string |
Further text to describe the contents. | undefined |
className |
string |
className applied to the container of the code element | |
children |
string |
The text that will be copied. | |
darkMode |
boolean |
Determines whether or not the component appears in dark mode. | false |
size |
'default', 'large' |
The display size of the label, description, and copyable children | 'default' |
copyable |
boolean |
Whether or not a copy button should be shown. | true |