UNPKG

@styleless-ui/react

Version:

Completely unstyled, headless and accessible React UI components.

29 lines (28 loc) 952 B
import * as React from "react"; import Button from "../../Button"; import type { MergeElementProps } from "../../typings"; interface OwnProps { /** * The content of the component. */ children?: React.ReactNode | ((ctx: { disabled: boolean; focusedVisible: boolean; }) => React.ReactNode); /** * The className applied to the component. */ className?: string | ((ctx: { disabled: boolean; focusedVisible: boolean; }) => string); } export type Props<T extends React.ElementType = typeof Button> = MergeElementProps<T, OwnProps & { /** * The component used for the root node. * Either a string to use a HTML element or a component. */ as?: T; }>; declare const SnackbarAction: <T extends React.ElementType<any> = React.ElementType<any>, E extends HTMLElement = HTMLElement>(props: Props<T>, ref: React.Ref<E>) => JSX.Element; export default SnackbarAction;