UNPKG

goobs-frontend

Version:

A comprehensive React-based libary for building modern web applications

55 lines 2.47 kB
import { default as React, FC, ReactNode } from 'react'; export interface AccordionProps { summary: ReactNode; details?: ReactNode; expanded?: boolean; defaultExpanded?: boolean; onChange?: (event: React.SyntheticEvent, expanded: boolean) => void; /** Styling options: theme plus scalar overrides wired to CSS custom properties. */ styles?: { /** Disables toggling/clicking and renders the disabled treatment. */ disabled?: boolean; /** Theme variant: 'sacred' or 'dark' select those variants; anything else (or unset) resolves to 'light'. */ theme?: string; /** @deprecated No-op — the indent level comes from the top-level `level` prop; scheduled for removal. */ level?: number; /** Container padding. */ padding?: string; /** Container border radius. */ borderRadius?: string; /** Container background color. */ backgroundColor?: string; /** Summary row background color. */ summaryBackgroundColor?: string; /** Summary text color (also applies to the active menu-item state). */ summaryColor?: string; /** Container CSS outline; `true` maps to 'none', `false` leaves the CSS default, a string passes through verbatim. */ outline?: string | boolean; /** Base indent in px before level scaling (default 20). */ levelIndentBase?: number; /** Extra indent in px per `level` (default 20): indent = base + level x increment. */ levelIndentIncrement?: number; /** Container border color. */ borderColor?: string; /** Container border width. */ borderWidth?: string; /** Container bottom margin. */ marginBottom?: string; }; level?: number; type?: 'accordion' | 'menu'; onClick?: (event: React.SyntheticEvent) => void; href?: string; /** * Element used to render a `type="menu"` item's link. Defaults to a plain * anchor (`'a'`) so the component works in any host; a Next.js consumer can * pass `linkComponent={NextLink}` for client-side navigation (it receives the * same `href`). Keeps `next/link` out of the module graph (it reads * `process.env.__NEXT_*` at load and throws outside Next). */ linkComponent?: React.ElementType; isActive?: boolean; } declare const Accordion: FC<AccordionProps>; export default Accordion; //# sourceMappingURL=index.d.ts.map