-
Notifications
You must be signed in to change notification settings - Fork 4k
/
Copy pathSearchCategory.d.ts
55 lines (42 loc) · 1.44 KB
/
SearchCategory.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import * as React from 'react'
import { SemanticShorthandContent } from '../../generic'
import SearchResult from './SearchResult'
export interface SearchCategoryProps extends StrictSearchCategoryProps {
[key: string]: any
}
export interface StrictSearchCategoryProps {
/** An element type to render as (string or function). */
as?: any
/** The item currently selected by keyboard shortcut. */
active?: boolean
/** Primary content. */
children?: React.ReactNode
/** Additional classes. */
className?: string
/** Shorthand for primary content. */
content?: SemanticShorthandContent
/** Display name. */
name?: string
/**
* Renders the SearchCategory layout.
*
* @param {object} categoryContent - The Renderable SearchCategory contents.
* @param {object} resultsContent - The Renderable SearchResult contents.
* @returns {*} - Renderable SearchCategory layout.
*/
layoutRenderer?: (
categoryContent: React.ReactElement<any>,
resultsContent: React.ReactElement<any>,
) => React.ReactElement<any>
/**
* Renders the category contents.
*
* @param {object} props - The SearchCategory props object.
* @returns {*} - Renderable category contents.
*/
renderer?: (props: SearchCategoryProps) => React.ReactElement<any>
/** Array of Search.Result props. */
results?: typeof SearchResult[]
}
declare const SearchCategory: React.StatelessComponent<SearchCategoryProps>
export default SearchCategory