UNPKG

@mantine/core

Version:

React components library focused on usability, accessibility and developer experience

23 lines 1.27 kB
import React from 'react'; import { DefaultProps } from '../../theme'; import useStyles from './Spoiler.styles'; export declare type SpoilerStylesNames = keyof ReturnType<typeof useStyles>; export interface SpoilerProps extends DefaultProps<SpoilerStylesNames>, React.ComponentPropsWithoutRef<'div'> { /** Max height of visible content, when this point is reached spoiler appears */ maxHeight: number; /** Label for close spoiler action */ hideLabel: React.ReactNode; /** Label for open spoiler action */ showLabel: React.ReactNode; /** Get ref of spoiler toggle button */ controlRef?: React.ForwardedRef<HTMLButtonElement>; /** Initial spoiler state, true to wrap content in spoiler, false to show content without spoiler, opened state will be updated on mount */ initialState?: boolean; /** Spoiler reveal transition duration in ms, 0 or null to turn off animation */ transitionDuration?: number; } export declare function Spoiler({ className, style, children, maxHeight, hideLabel, showLabel, themeOverride, transitionDuration, controlRef, initialState, classNames, styles, ...others }: SpoilerProps): JSX.Element; export declare namespace Spoiler { var displayName: string; } //# sourceMappingURL=Spoiler.d.ts.map