Skip to content

code/editor/find/FindBar

import { … } from 'zidane-ui/code/editor'ui/src/code/editor/find/FindBar.tsx

Components#

FindBarComponent#

The find bar over a file view or diffs; renders nothing while find is closed.

TypeScript
function FindBar(props: FindBarProps): Element | null
Parameters
NameTypeDescription
propsFindBarProps

find: the state from useFind; label: the box's placeholder and accessible name.

Element | null
FindBar props
NameTypeDescription
className?string

Extra classes on the root element.

find{ asked: number; capped: boolean; caseSensitive: boolean; close: () => void; index: number; jumpTo: (q: string, o: FindOptions, at: Omit<LineMatch, 'end'>) => void; open: boolean; query: string; searching: boolean; setQuery: Dispatch<SetStateAction<string>>; show: () => void; step: (direction: -1 | 1) => void; toggleCase: () => void; total: number }

The find to drive, from useFind.

labelstring

The search box's placeholder and the bar's accessible name ("Find in file").

style?CSSProperties

Inline styles on the root element, merged after the component's own.

ui/src/code/editor/find/FindBar.tsx:30

Interfaces#

FindBarPropsInterface#

Props for FindBar.

TypeScript
interface FindBarProps
FindBarProps properties
NameTypeDescription
className?string

Extra classes on the root element.

find{ asked: number; capped: boolean; caseSensitive: boolean; close: () => void; index: number; jumpTo: (q: string, o: FindOptions, at: Omit<LineMatch, 'end'>) => void; open: boolean; query: string; searching: boolean; setQuery: Dispatch<SetStateAction<string>>; show: () => void; step: (direction: -1 | 1) => void; toggleCase: () => void; total: number }

The find to drive, from useFind.

labelstring

The search box's placeholder and the bar's accessible name ("Find in file").

style?CSSProperties

Inline styles on the root element, merged after the component's own.

ui/src/code/editor/find/FindBar.tsx:14