@wix/design-system
Version:
@wix/design-system
37 lines • 1.6 kB
TypeScript
import * as React from 'react';
import type { SupportedWixLocales } from '@wix/design-systems-locale-utils';
export type CounterBadgeSize = 'medium' | 'small' | 'tiny';
export type CounterBadgeType = 'solid' | 'outlined';
export type CounterBadgeSkin = 'general' | 'standard' | 'danger' | 'warning' | 'warningLight' | 'urgent' | 'success' | 'neutralStandard' | 'light' | 'neutralLight';
export interface CounterBadgeProps {
/** Any element to be rendered inside */
children?: React.ReactNode;
/** Applied as data-hook HTML attribute that can be used in the tests */
dataHook?: string;
/** Specifies a CSS class name to be appended to the component’s root element.
* @internal
*/
className?: string;
/** Sets locale and formats the number according to it */
locale?: SupportedWixLocales;
/** The component's colors */
skin?: CounterBadgeSkin;
/**
* The component's visual style
* @default 'solid'
*/
type?: CounterBadgeType;
/** The component's size. Can be tiny, small or medium */
size?: CounterBadgeSize;
/** Makes the card have a box-shadow style */
showShadow?: boolean;
/** Control whether values greater than 99 should be truncated
* @default true
*/
truncate?: boolean;
/** Callback fired when the mouse pointer enters the component */
onMouseEnter?: React.MouseEventHandler<HTMLDivElement>;
/** Callback fired when the mouse pointer leaves the component */
onMouseLeave?: React.MouseEventHandler<HTMLDivElement>;
}
//# sourceMappingURL=CounterBadge.types.d.ts.map