@gravity-ui/uikit
Version:
Gravity UI base styling and components
26 lines (18 loc) • 1 kB
Markdown
# ClipboardIcon
`ClipboardIcon` is an animated copy icon that reflects the copy state (idle or success); it is meant to sit inside `CopyToClipboard` or `ClipboardButton` rather than be used on its own.
```tsx
import {ClipboardIcon} from '@gravity-ui/uikit';
```
### Status
Depending on the `status` property, the icon will be changing accordingly:
```tsx
<CopyToClipboard text="Some text to copy" timeout={500}>
{(status) => <ClipboardIcon size={24} status={status} />}
</CopyToClipboard>
```
## Properties
| Name | Description | Type | Default |
| :-------- | :---------------------------------------------------------- | :------- | :------ |
| className | `class` HTML attribute | `string` | |
| size | Determines the icon size | `number` | |
| status | The available values are `pending`, `success`, and `error`. | `string` | |