@mantine/core
Version:
React components library focused on usability, accessibility and developer experience
35 lines (34 loc) • 1.56 kB
TypeScript
import React from 'react';
import { BoxProps, PolymorphicFactory, StylesApiProps } from '../../core';
export type CenterStylesNames = 'root';
export interface CenterProps extends BoxProps, StylesApiProps<CenterFactory> {
/** Content that should be centered vertically and horizontally */
children?: React.ReactNode;
/** Determines whether `inline-flex` should be used instead of `flex`, `false` by default */
inline?: boolean;
}
export type CenterFactory = PolymorphicFactory<{
props: CenterProps;
defaultRef: HTMLDivElement;
defaultComponent: 'div';
stylesNames: CenterStylesNames;
}>;
export declare const Center: (<C = "div">(props: import("../../core/factory/create-polymorphic-component").PolymorphicComponentProps<C, CenterProps>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>) & Omit<React.FunctionComponent<(CenterProps & {
component?: any;
} & Omit<Omit<any, "ref">, "component" | keyof CenterProps> & {
ref?: any;
renderRoot?: ((props: any) => any) | undefined;
}) | (CenterProps & {
component: React.ElementType<any>;
renderRoot?: ((props: Record<string, any>) => any) | undefined;
})>, never> & import("../../core/factory/factory").ThemeExtend<{
props: CenterProps;
defaultRef: HTMLDivElement;
defaultComponent: 'div';
stylesNames: CenterStylesNames;
}> & import("../../core/factory/factory").ComponentClasses<{
props: CenterProps;
defaultRef: HTMLDivElement;
defaultComponent: 'div';
stylesNames: CenterStylesNames;
}> & Record<string, never>;