export type TriggerChildren = React.ReactNode | ((state: State) => React.ReactNode); /** * Props for a Base UI trigger part whose children are the trigger. Pair with * `resolveTrigger`, which turns those children into the part's `render`. */ export type WithTriggerChildren = Omit & { /** * An element is used as the trigger itself. A string, or a function of the * trigger's state, is content: it renders inside a focusable * `role="button"` span, and a function re-renders as the state changes. * With your own `render`, children are its content, as in Base UI, so * pass a node rather than a function. */ children?: TriggerChildren; }; /** * Whether these children, or a caller's own `render`, amount to a trigger. * A composed component skips its Trigger part when this is false, so nothing * stands in for a trigger nobody passed: a controlled dialog opened from * elsewhere would otherwise get an empty focusable span as a tab stop. * * What React renders as nothing is no trigger either — see `isRenderable`. * `trigger={cond &&