UNPKG

@mantine/core

Version:

React components library focused on usability, accessibility and developer experience

41 lines (40 loc) 1.87 kB
import React from 'react'; import { BoxProps, MantineRadius, PolymorphicFactory, StylesApiProps } from '../../core'; export type BackgroundImageStylesNames = 'root'; export type BackgroundImageCssVariables = { root: '--bi-radius'; }; export interface BackgroundImageProps extends BoxProps, StylesApiProps<BackgroundImageFactory> { /** Key of `theme.radius` or any valid CSS value to set border-radius, numbers are converted to rem, `0` by default */ radius?: MantineRadius; /** Image url */ src: string; } export type BackgroundImageFactory = PolymorphicFactory<{ props: BackgroundImageProps; defaultRef: HTMLDivElement; defaultComponent: 'div'; stylesNames: BackgroundImageStylesNames; vars: BackgroundImageCssVariables; }>; export declare const BackgroundImage: (<C = "div">(props: import("../../core/factory/create-polymorphic-component").PolymorphicComponentProps<C, BackgroundImageProps>) => React.ReactElement<any, string | React.JSXElementConstructor<any>>) & Omit<React.FunctionComponent<(BackgroundImageProps & { component?: any; } & Omit<Omit<any, "ref">, "component" | keyof BackgroundImageProps> & { ref?: any; renderRoot?: ((props: any) => any) | undefined; }) | (BackgroundImageProps & { component: React.ElementType<any>; renderRoot?: ((props: Record<string, any>) => any) | undefined; })>, never> & import("../../core/factory/factory").ThemeExtend<{ props: BackgroundImageProps; defaultRef: HTMLDivElement; defaultComponent: 'div'; stylesNames: BackgroundImageStylesNames; vars: BackgroundImageCssVariables; }> & import("../../core/factory/factory").ComponentClasses<{ props: BackgroundImageProps; defaultRef: HTMLDivElement; defaultComponent: 'div'; stylesNames: BackgroundImageStylesNames; vars: BackgroundImageCssVariables; }> & Record<string, never>;