8.0.25 • Published 24 days ago

@leafygreen-ui/copyable v8.0.25

Weekly downloads
9
License
Apache-2.0
Repository
github
Last release
24 days ago

Copyable

npm (scoped)

View on MongoDB.design

Installation

Yarn

yarn add @leafygreen-ui/copyable

NPM

npm install @leafygreen-ui/copyable

Example

<Copyable label="Label" description="Description">
  {'npm install @leafygreen-ui/copyable'}
</Copyable>

Output HTML

<label class="leafygreen-ui-1x9zy2h" for="copyable-7">Label</label>
<p class="leafygreen-ui-1jtodpe">Description</p>
<div class="leafygreen-ui-1r7yzs7">
  <code class="leafygreen-ui-b24pl6" id="copyable-7"
    >npm install @leafygreen-ui/copyable</code
  ><span class="leafygreen-ui-10wc33h"
    ><button
      type="button"
      class="leafygreen-ui-crgt"
      aria-disabled="false"
      aria-describedby="tooltip-7"
    >
      <span class="leafygreen-ui-tdo6z2"
        ><svg
          class="leafygreen-ui-1akpp5z"
          height="20"
          width="20"
          viewBox="0 0 16 16"
          role="img"
          aria-labelledby="Copy-7"
        >
          <title id="Copy-7">Copy Icon</title>
          <desc>Created with Sketch.</desc>
          <g
            id="Copy-Copy"
            stroke="none"
            stroke-width="1"
            fill="none"
            fill-rule="evenodd"
          >
            <path
              d="M13,5 L10,5 L10,2 L7,2 L7,11 L13,11 L13,5 Z M15,5 L15,13 L5,13 L5,0 L10,0 L15,5 Z"
              fill="currentColor"
            ></path>
            <path
              d="M4,4 L4,5 L2,5 L2,15 L9,15 L9,14 L10,14 L10,16 L1,16 L1,4 L4,4 Z"
              fill="currentColor"
            ></path>
          </g></svg
        >Copy</span
      >
    </button></span
  >
</div>

Properties

PropTypeDescriptionDefault
labelstringLabel text for the copyable contents.
descriptionstringFurther text to describe the contents.undefined
classNamestringclassName applied to the container of the code element
childrenstringThe text that will be copied.
darkModebooleanDetermines whether or not the component appears in dark mode.false
size'default', 'large'The display size of the label, description, and copyable children'default'
copyablebooleanWhether or not a copy button should be shown.true
shouldTooltipUsePortalbooleanWhether or not the "Copied!" tooltip should use a React portaltrue
8.0.25

24 days ago

8.0.24

1 month ago

8.0.23

2 months ago

8.0.23-popover.0

4 months ago

9.0.0-alpha.1

10 months ago

9.0.0-alpha.0

10 months ago

8.0.14

10 months ago

8.0.13

10 months ago

8.0.16

9 months ago

8.0.15

9 months ago

8.0.18

9 months ago

8.0.17

9 months ago

8.0.19

8 months ago

8.0.21

7 months ago

8.0.20

8 months ago

8.0.22

6 months ago

8.0.9

12 months ago

8.0.8

12 months ago

8.0.10

11 months ago

8.0.12

11 months ago

8.0.11

11 months ago

8.0.10-next.1

12 months ago

8.0.10-next.2

12 months ago

8.0.10-next.3

12 months ago

8.0.10-next.4

12 months ago

8.0.10-next.5

12 months ago

8.0.10-next.6

12 months ago

8.0.10-next.7

12 months ago

8.0.10-next.0

12 months ago

8.0.7

1 year ago

8.0.6

1 year ago

8.0.5

1 year ago

8.0.4

1 year ago

8.0.1

1 year ago

8.0.0

1 year ago

8.0.3

1 year ago

8.0.2

1 year ago

6.0.3

2 years ago

6.0.2

2 years ago

7.0.0

2 years ago

7.0.1

2 years ago

6.0.2-test.1

2 years ago

6.0.2-next.2

2 years ago

6.0.2-next.0

2 years ago

6.0.2-next.1

2 years ago

6.0.1

2 years ago

6.0.2-test.0

2 years ago

5.0.0

2 years ago

6.0.0

2 years ago

4.0.1

2 years ago

4.0.2

2 years ago

4.0.0

2 years ago

3.0.0

2 years ago

2.0.11

3 years ago

2.0.10

3 years ago

2.0.9

3 years ago

2.0.7

3 years ago

2.0.8

3 years ago

2.0.6

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.0

3 years ago