MCPcopy Create free account
hub / github.com/chakra-ui/panda / formatJsxValue

Function formatJsxValue

packages/generator/src/shared.ts:7–7  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

5
6export const formatFunctionValue = (value: string): string => (isBooleanValue(value) ? value : `'${value}'`)
7export const formatJsxValue = (value: string): string => (isBooleanValue(value) ? `{${value}}` : `"${value}"`)
8
9export const buildFunctionProps = (key: string, value: string) => `${key}: ${formatFunctionValue(value)}`
10export const buildJsxProps = (key: string, value: string) => `${key}=${formatJsxValue(value)}`

Callers 2

generateRecipesSpecFunction · 0.90
buildJsxPropsFunction · 0.85

Calls 1

isBooleanValueFunction · 0.85

Tested by

no test coverage detected