mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
refactor: inline Copy
component (#1175)
This commit is contained in:
parent
ef46f350be
commit
f8aecdbef1
5 changed files with 125 additions and 29 deletions
16
types/CopyButton/CopyButton.svelte.d.ts
vendored
16
types/CopyButton/CopyButton.svelte.d.ts
vendored
|
@ -1,8 +1,20 @@
|
|||
/// <reference types="svelte" />
|
||||
import { SvelteComponentTyped } from "svelte";
|
||||
import { CopyProps } from "../Copy/Copy.svelte";
|
||||
|
||||
export interface CopyButtonProps extends CopyProps {
|
||||
export interface CopyButtonProps
|
||||
extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["button"]> {
|
||||
/**
|
||||
* Set the feedback text shown after clicking the button
|
||||
* @default "Copied!"
|
||||
*/
|
||||
feedback?: string;
|
||||
|
||||
/**
|
||||
* Set the timeout duration (ms) to display feedback text
|
||||
* @default 2000
|
||||
*/
|
||||
feedbackTimeout?: number;
|
||||
|
||||
/**
|
||||
* Set the title and ARIA label for the copy button
|
||||
* @default "Copy to clipboard"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue