UNPKG

alouette

Version:

A modern, customizable design system built on top of NativeWind v5 with configurable defaults

29 lines • 1.3 kB
import type { ReactNode } from "react"; import type { GestureResponderEvent } from "react-native"; import type { Accent } from "../../core/AlouetteConfig"; import { type SVGIconElement } from "../primitives/Icon"; export interface MenuItemProps { label: string; /** What the action does, under the label. */ description?: string; icon?: SVGIconElement; /** Replaces `icon` while the row is hovered, focused or pressed. */ activeIcon?: SVGIconElement; /** Colours the row's label and icon — `danger` for a destructive action. */ accent?: Accent; /** * Makes the row one choice of a set (`menuitemradio`), checked or not; the * check column is kept on every row of the set so the labels line up. */ checked?: boolean; /** * Destination. Renders a real `<a href>` on web (native ignores it); expo * Router's `<Link asChild>` injects it together with `onPress`. */ href?: string; disabled?: boolean; onPress?: (event: GestureResponderEvent) => void; } /** One action of a {@link Menu}. Pressing it runs `onPress` and closes the menu. */ export declare function MenuItem({ label, description, icon, activeIcon, accent, checked, href, disabled, onPress, }: MenuItemProps): ReactNode; //# sourceMappingURL=MenuItem.d.ts.map