npm.io
12.0.4 • Published 1 month ago

@leafygreen-ui/copyable

Licence
Apache-2.0
Version
12.0.4
Deps
11
Size
132 kB
Vulns
0
Weekly
0
Stars
274

Copyable

npm (scoped)

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