@wix/design-system
Version:
@wix/design-system
28 lines • 1.23 kB
TypeScript
import { ReactNode } from 'react';
import { ValuesOf } from '../utils/typeUtils';
import { SHAPES, COLORS } from './ComposerButton.constants';
import { ButtonWithAsProp } from '../Button';
export type ComposerButtonHandle = {
focus: () => void;
};
export type ComposerButtonProps = ButtonWithAsProp<{
/** Applies a data-hook HTML attribute that can be used in tests. */
dataHook?: string;
/** Sets label value. */
label: ReactNode;
/** Used for passing any `@wix/design-system` icon. For external icon make sure to follow ux sizing guidelines. */
children: ReactNode;
/** Sets button shape. */
shape?: ComposerButtonShape;
/** Sets button color. */
color?: ComposerButtonColor;
/** Truncates label that is longer than its parent container and displays ellipsis at the end of the last line. */
ellipsis?: boolean;
/** Truncates label text at a specific number of lines when using ellipsis. */
maxLines?: number;
/** Specifies whether user interactions are disabled. */
disabled?: boolean;
}>;
export type ComposerButtonShape = ValuesOf<typeof SHAPES>;
export type ComposerButtonColor = ValuesOf<typeof COLORS>;
//# sourceMappingURL=ComposerButton.types.d.ts.map