Skip to content

Commit

Permalink
HDS-2688 import ButtonSignature and remove redundant properties
Browse files Browse the repository at this point in the history
  • Loading branch information
KristinLBradley committed May 17, 2024
1 parent 71e5335 commit 62a1cba
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions packages/components/src/components/hds/copy/button/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ import Component from '@glimmer/component';
import { assert } from '@ember/debug';
import { tracked } from '@glimmer/tracking';
import { action } from '@ember/object';
import { HdsCopyButtonSizeValues } from './types';
import type { HdsCopyButtonSizes, HdsCopyButtonItemToCopy } from './types';
import { HdsCopyButtonSizeValues } from './types.ts';
import type { HdsCopyButtonSizes, HdsCopyButtonItemToCopy } from './types.ts';
import type { HdsButtonSignature } from '../../button/';

export const DEFAULT_SIZE = HdsCopyButtonSizeValues.Medium;
export const SIZES: string[] = Object.values(HdsCopyButtonSizeValues);
Expand All @@ -18,19 +19,16 @@ export const ERROR_ICON = 'clipboard-x';
export const DEFAULT_STATUS = 'idle';

export interface HdsCopyButtonSignature {
Args: {
Args: HdsButtonSignature['Args'] & {
size?: HdsCopyButtonSizes;
isIconOnly?: boolean;
isFullWidth?: boolean;
text: string;
textToCopy?: HdsCopyButtonItemToCopy;
targetToCopy?: HdsCopyButtonItemToCopy;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
onSuccess?: (...args: any[]) => void;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
onError?: (...args: any[]) => void;
};
Element: HTMLElement;
Element: HdsButtonSignature['Element'];
}

export default class HdsCopyButtonComponent extends Component<HdsCopyButtonSignature> {
Expand Down

0 comments on commit 62a1cba

Please sign in to comment.