@serendie/ui
Version:
Adaptive UI component library as part of Serendie Design System by Mitsubishi Electric
58 lines (57 loc) • 2.1 kB
TypeScript
import { default as React } from 'react';
import { RecipeVariantProps } from '../../../../styled-system/css';
declare const cellStyle: import('../../../../styled-system/types').RecipeRuntimeFn<{
type: {
default: {
background: "sd.system.color.component.surface";
};
success: {
background: "sd.system.color.impression.positiveContainerVariant";
};
notice: {
background: "sd.system.color.impression.noticeContainerVariant";
};
error: {
background: "sd.system.color.impression.negativeContainerVariant";
color: "sd.system.color.impression.onNegativeContainerVariant";
};
};
state: {
enabled: {};
hovered: {
background: "color-mix(in srgb, token(colors.sd.system.color.component.surface) 95%, token(colors.sd.system.color.component.inverseSurface) 5%)";
};
selected: {
background: "sd.system.color.component.inversePrimary";
};
};
size: {
small: {
fontSize: "11px";
height: "24px";
};
medium: {
fontSize: "13px";
height: "32px";
};
large: {
fontSize: "15px";
height: "40px";
};
};
}>;
type CellStyleVariants = RecipeVariantProps<typeof cellStyle>;
type ExtractVariantProperty<T, K extends string> = NonNullable<T> extends infer V ? V extends {
[P in K]?: infer U;
} ? U : never : never;
export type CellType = ExtractVariantProperty<CellStyleVariants, "type">;
type CellState = ExtractVariantProperty<CellStyleVariants, "state">;
type CellSize = ExtractVariantProperty<CellStyleVariants, "size">;
export declare const BodyCell: React.ForwardRefExoticComponent<Omit<{
children: React.ReactNode;
size?: CellSize;
type?: CellType | string;
state?: CellState;
className?: string;
} & React.ClassAttributes<HTMLTableDataCellElement> & React.TdHTMLAttributes<HTMLTableDataCellElement>, "ref"> & React.RefAttributes<HTMLTableCellElement>>;
export {};