@coveord/plasma-mantine
Version:
A Plasma flavoured Mantine theme
97 lines • 3.43 kB
TypeScript
import { BadgeCssVariables, BadgeProps, BadgeStylesNames, BadgeVariant, ElementProps, PolymorphicComponentProps, PolymorphicFactory } from '@mantine/core';
import { ForwardRefExoticComponent, ReactNode, RefAttributes } from 'react';
export interface SemanticBadgeProps extends Pick<BadgeProps, 'm' | 'mt' | 'mb' | 'ml' | 'mr' | 'ms' | 'me' | 'mx' | 'my' | 'miw' | 'maw' | 'pos' | 'top' | 'left' | 'right' | 'bottom' | 'inset' | 'display' | 'flex' | 'leftSection' | 'rightSection' | 'fullWidth' | 'circle'>, ElementProps<'div'> {
/**
* The size of the badge.
* @default 'small'
*/
size?: 'small' | 'large';
/**
* Whether the badge is displayed over a light or dark background.
* @default Falls back to theme.
*/
on?: 'light' | 'dark';
/**
* The content of the badge.
*/
children?: ReactNode;
}
export type SemanticBadge = ForwardRefExoticComponent<SemanticBadgeProps & RefAttributes<HTMLDivElement>>;
export type BadgeOverloadFactory = PolymorphicFactory<{
props: BadgeProps;
defaultRef: HTMLDivElement;
defaultComponent: 'div';
stylesNames: BadgeStylesNames;
vars: BadgeCssVariables;
variant: BadgeVariant;
staticComponents: {
Primary: SemanticBadge;
Secondary: SemanticBadge;
Success: SemanticBadge;
Critical: SemanticBadge;
Warning: SemanticBadge;
Disabled: SemanticBadge;
};
}>;
export declare const Badge: (<C = "div">(props: PolymorphicComponentProps<C, BadgeProps>) => React.ReactElement) & Omit<import("react").FunctionComponent<(BadgeProps & {
component?: any;
} & Omit<Omit<any, "ref">, "component" | keyof BadgeProps> & {
ref?: any;
renderRoot?: (props: any) => any;
}) | (BadgeProps & {
component: React.ElementType;
renderRoot?: (props: Record<string, any>) => any;
})>, never> & import("@mantine/core").ThemeExtend<{
props: BadgeProps;
defaultRef: HTMLDivElement;
defaultComponent: "div";
stylesNames: BadgeStylesNames;
vars: BadgeCssVariables;
variant: BadgeVariant;
staticComponents: {
Primary: SemanticBadge;
Secondary: SemanticBadge;
Success: SemanticBadge;
Critical: SemanticBadge;
Warning: SemanticBadge;
Disabled: SemanticBadge;
};
}> & import("@mantine/core").ComponentClasses<{
props: BadgeProps;
defaultRef: HTMLDivElement;
defaultComponent: "div";
stylesNames: BadgeStylesNames;
vars: BadgeCssVariables;
variant: BadgeVariant;
staticComponents: {
Primary: SemanticBadge;
Secondary: SemanticBadge;
Success: SemanticBadge;
Critical: SemanticBadge;
Warning: SemanticBadge;
Disabled: SemanticBadge;
};
}> & import("@mantine/core").PolymorphicComponentWithProps<{
props: BadgeProps;
defaultRef: HTMLDivElement;
defaultComponent: "div";
stylesNames: BadgeStylesNames;
vars: BadgeCssVariables;
variant: BadgeVariant;
staticComponents: {
Primary: SemanticBadge;
Secondary: SemanticBadge;
Success: SemanticBadge;
Critical: SemanticBadge;
Warning: SemanticBadge;
Disabled: SemanticBadge;
};
}> & {
Primary: SemanticBadge;
Secondary: SemanticBadge;
Success: SemanticBadge;
Critical: SemanticBadge;
Warning: SemanticBadge;
Disabled: SemanticBadge;
};
//# sourceMappingURL=Badge.d.ts.map