UNPKG

@dnanpm/styleguide

Version:

DNA Styleguide repository provides the set of components and theme object used in various DNA projects.

49 lines (48 loc) 1.44 kB
import React, { type ReactNode } from 'react'; type Position = 'left' | 'right' | 'middle'; type InfoDialogType = 'default' | 'sale'; interface Props { /** * Unique ID for the component */ id?: string; /** * Allows to change the position of the component. * * @param {Position} left Renders component on the left * @param {Position} right Renders component on the right * @param {Position} middle Renders component in the middle * * @default 'middle' */ position?: Position; /** * Allows to change the border color styling of component, depending on the passed type * * @param {InfoDialogType} default Uses `theme.color.default.pink` color for styling * @param {InfoDialogType} sale Uses `theme.color.accent.orange` color for styling * * @default 'default' */ type?: InfoDialogType; /** * Content of the component */ children?: ReactNode; /** * Allows to pass a custom className */ className?: string; /** * Allows to pass testid string for testing purposes */ 'data-testid'?: string; /** * Allows to pass a screen reader label to the component */ ariaLabel?: string; } /** @visibleName Info Dialog */ declare const InfoDialog: ({ position, type, "data-testid": dataTestId, ...props }: Props) => React.JSX.Element; /** @component */ export default InfoDialog;