UNPKG

@ozen-ui/kit

Version:

React component library

23 lines (22 loc) 1.15 kB
import './File.css'; import type { ReactNode, ElementType } from 'react'; import { type PolymorphicComponentPropsWithoutRef } from '../../utils/polymorphicComponentWithRef'; import { FILE_DEFAULT_TAG } from './constants'; export declare const cnFile: import("@bem-react/classname").ClassNameFormatter; export declare const fileColorVariant: readonly ["main", "primary"]; export type FileColorVariant = (typeof fileColorVariant)[number]; export type FileBaseProps = { /** Содержимое */ children: ReactNode; /** * Цвет * @default main * */ color?: FileColorVariant; /** Если `true` отображает иконку загрузки и изменяет стилизацию */ loading?: boolean; /** Если `true` отображает иконку ошибки и изменяет стилизацию */ error?: boolean; }; export type FileProps<As extends ElementType = typeof FILE_DEFAULT_TAG> = PolymorphicComponentPropsWithoutRef<FileBaseProps, As>; export declare const File: import("../../utils/polymorphicComponentWithRef").PolymorphicComponentWithRef<FileBaseProps, "div", "as">;