@wix/design-system
Version:
@wix/design-system
46 lines • 1.82 kB
TypeScript
import { SKIN, LAYOUT, SIZE, BORDER } from './constants';
import { ValuesOf } from '../utils/typeUtils';
import React from 'react';
export type SectionHelperSkin = ValuesOf<typeof SKIN>;
export type SectionHelperAppearance = SectionHelperSkin;
export type SectionHelperSize = ValuesOf<typeof SIZE>;
export type SectionHelperLayout = ValuesOf<typeof LAYOUT>;
export type SectionHelperBorder = ValuesOf<typeof BORDER>;
export type SectionHelperProps = {
children?: React.ReactNode;
/** Applied as data-hook HTML attribute that can be used in the tests */
dataHook?: string;
/** Sets the look and feel of the component */
skin?: SectionHelperSkin;
/** @deprecated use skin prop instead */
appearance?: SectionHelperAppearance;
/** Adds text as the title */
title?: React.ReactNode;
/** Controls the component padding*/
size?: SectionHelperSize;
/** decide if to show the close button */
showCloseButton?: boolean;
/** When provided, will make a close button appear and invoke it upon click */
onClose?: React.MouseEventHandler<HTMLElement>;
/** When provided, will make an action button appear and invoke it upon click */
onAction?: React.MouseEventHandler<HTMLElement>;
/** Text or any child component for the action button */
actionText?: React.ReactNode;
/** Set the content width to 100% */
fullWidth?: boolean;
/**
* Controls the component layout
* @default vertical
*/
layout?: SectionHelperLayout;
/**
* Controls the component border
* @default standard
*/
border?: SectionHelperBorder;
/** Enables showing prefix icon */
showPrefixIcon?: boolean;
/** Overrides default prefix icon */
prefixIcon?: React.ReactNode;
};
//# sourceMappingURL=SectionHelper.types.d.ts.map