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

Function FunctionAPI

packages/dev/docs/src/FunctionAPI.js:17–33  ·  view source on GitHub ↗
({function: func, links})

Source from the content-addressed store, hash-verified

15import typographyStyles from '@adobe/spectrum-css-temp/components/typography/vars.css';
16
17export function FunctionAPI({function: func, links}) {
18 let {name, parameters, return: returnType, typeParameters} = func;
19
20 return (
21 <TypeContext.Provider value={links}>
22 <code className={`${typographyStyles['spectrum-Code4']}`}>
23 <span className="token hljs-function">{name}</span>
24 <TypeParameters typeParameters={typeParameters} />
25 <Indent params={parameters} open="(" close=")">
26 <JoinList elements={parameters} joiner=", " />
27 </Indent>
28 <span className="token punctuation">{': '}</span>
29 <Type type={returnType} />
30 </code>
31 </TypeContext.Provider>
32 );
33}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected