chore: slight refactor

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2022-07-13 11:35:39 +02:00
parent 9386402764
commit db41d20e99
2 changed files with 10 additions and 4 deletions
+1
View File
@@ -190,6 +190,7 @@ export function CopyTextButton(props: CopyTextButtonProps): JSX.Element;
// @public
export interface CopyTextButtonProps {
'aria-label'?: string;
text: string;
tooltipDelay?: number;
tooltipText?: string;
@@ -47,11 +47,16 @@ export interface CopyTextButtonProps {
* Default: "Text copied to clipboard"
*/
tooltipText?: string;
}
type LabelledCopyTextButtonProps = CopyTextButtonProps & {
/**
* Text to use as aria-label prop on the button
*
* @remarks
*
* Default: "Copy text"
*/
'aria-label'?: string;
};
}
/**
* Copy text button with visual feedback
@@ -72,7 +77,7 @@ type LabelledCopyTextButtonProps = CopyTextButtonProps & {
* arial-label="Accessible label for this button" />
* ```
*/
export function CopyTextButton(props: LabelledCopyTextButtonProps) {
export function CopyTextButton(props: CopyTextButtonProps) {
const {
text,
tooltipDelay = 1000,