@workday/canvas-kit-preview-react
Version:
Canvas Kit Preview is made up of components that have the full design and a11y review, are part of the DS ecosystem and are approved for use in product. The API's could be subject to change, but not without strong communication and migration strategies.
53 lines • 2.27 kB
TypeScript
import React from 'react';
import { ExtractProps } from '@workday/canvas-kit-react/common';
import { Flex } from '@workday/canvas-kit-react/layout';
export type StatusIndicatorVariant = 'gray' | 'orange' | 'blue' | 'green' | 'red' | 'transparent';
export interface StatusIndicatorProps extends ExtractProps<typeof Flex, never> {
/**
* Defines the emphasis of the `StatusIndicator`.
* `high` emphasis will create more contrast between the background and text colors.
* `low` emphasis will create less contrast between the background and text colors.
* @default 'low'
*/
emphasis?: 'high' | 'low';
/**
* Defines the color of the `StatusIndicator`.
* @default 'gray'
*/
variant?: StatusIndicatorVariant;
/**
* Children of the `StatusIndicator`. Can contain a `StatusIndicator.Label` and optionally a `StatusIndicator.Icon`.
*/
children: React.ReactNode;
}
/**
* `StatusIndicator` is a container component which renders an {@link Flex} under the hood to
* apply spacing evenly between its children. It has a default maximum width of `200px`.
*
* ```tsx
* <StatusIndicator emphasis="low" variant="blue">
* {Child components}
* </StatusIndicator>
* ```
*/
export declare const StatusIndicator: import("@workday/canvas-kit-react/common").ElementComponent<"div", StatusIndicatorProps> & {
/**
* `StatusIndicator.Label` renders {@link Text} under the hood. It will apply an ellipsis if its
* contents exceed the component's maximum width.
*
* ```tsx
* <StatusIndicator.Label>{The text to be rendered}</StatusIndicator.Label>
* ```
*/
Label: import("@workday/canvas-kit-react/common").ElementComponent<"span", import("./StatusIndicatorLabel").StatusIndicatorLabelProps>;
/**
* `StatusIndicator.Icon` renders {@link SystemIcon} under the hood. It's used as a decorative
* element to visually support the {@link StatusIndicatorLabel StatusIndicator.Label} text.
*
* ```tsx
* <StatusIndicator.Icon icon={uploadCloudIcon} />
* ```
*/
Icon: import("@workday/canvas-kit-react/common").ElementComponent<"span", import("@workday/canvas-kit-react/icon").SystemIconProps>;
};
//# sourceMappingURL=StatusIndicator.d.ts.map