From e3162894e5488099caafa65461a9ae8ac8d95fa0 Mon Sep 17 00:00:00 2001 From: Hellen Date: Fri, 2 Feb 2024 15:33:28 +0300 Subject: [PATCH] feat(ClipboardButton): add view property (#1302) --- src/components/ClipboardButton/ClipboardButton.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/ClipboardButton/ClipboardButton.tsx b/src/components/ClipboardButton/ClipboardButton.tsx index 83606dfa55..7a0ebc6daf 100644 --- a/src/components/ClipboardButton/ClipboardButton.tsx +++ b/src/components/ClipboardButton/ClipboardButton.tsx @@ -1,7 +1,7 @@ import React from 'react'; import {Button} from '../Button'; -import type {ButtonProps} from '../Button'; +import type {ButtonProps, ButtonView} from '../Button'; import {ClipboardIcon} from '../ClipboardIcon'; import {CopyToClipboard} from '../CopyToClipboard'; import {CopyToClipboardStatus} from '../CopyToClipboard/types'; @@ -25,6 +25,8 @@ export interface ClipboardButtonProps interface ClipboardButtonComponentProps extends QAProps { /** Icon size in pixels */ size?: number; + /** View of a button */ + view?: ButtonView; /** Element CSS class */ className?: string; status: CopyToClipboardStatus; @@ -44,6 +46,7 @@ const DEFAULT_TIMEOUT = 1000; const ClipboardButtonComponent = (props: ClipboardButtonComponentProps) => { const { + view = 'flat', size = DEFAULT_ICON_SIZE, className, qa, @@ -68,10 +71,10 @@ const ClipboardButtonComponent = (props: ClipboardButtonComponentProps) => { >