MCPcopy Create free account
hub / github.com/adobe/react-spectrum / FunctionAPI

Function FunctionAPI

packages/dev/s2-docs/src/FunctionAPI.tsx:36–52  ·  view source on GitHub ↗
({function: func, links, grouped}: FunctionAPIProps)

Source from the content-addressed store, hash-verified

34}
35
36export function FunctionAPI({function: func, links, grouped}: FunctionAPIProps) {
37 let {name, parameters, return: returnType, typeParameters} = func;
38 if (links) {
39 setLinks(links);
40 }
41 return (
42 <code className={mergeStyles(codeStyles.function, grouped ? groupedBlock : block)}>
43 <span className={codeStyles.attribute}>{name}</span>
44 <TypeParameters typeParameters={typeParameters} />
45 <Indent params={parameters} open="(" close=")">
46 <JoinList elements={parameters} joiner=", " />
47 </Indent>
48 <span className={codeStyles.string}>{': '}</span>
49 <Type type={returnType} />
50 </code>
51 );
52}
53
54export function FunctionAPIGroup({functions}: {functions: FunctionAPIProps[]}) {
55 return (

Callers

nothing calls this directly

Calls 2

setLinksFunction · 0.90
mergeStylesFunction · 0.90

Tested by

no test coverage detected