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

Function font

packages/@react-spectrum/ai/src/style/prose.ts:336–348  ·  view source on GitHub ↗
(value: keyof typeof fontSize)

Source from the content-addressed store, hash-verified

334} as const;
335
336function font(value: keyof typeof fontSize) {
337 let type = value.split('-')[0];
338 let size = fontSize[value];
339 return {
340 fontFamily: fontFamily[type === 'code' ? 'code' : 'sans'],
341 '--fs': `pow(1.125, ${size})`,
342 fontSize: `round(${fontSizeCalc} / 16 * 1rem, 1px)`,
343 fontWeight:
344 fontWeight[type === 'heading' || type === 'title' || type === 'detail' ? type : 'normal'],
345 lineHeight: lineHeight[type],
346 color: fontColor[type as keyof typeof fontColor]
347 };
348}
349
350function margin(value: keyof typeof marginTop) {
351 return {

Callers 1

proseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected