( props: Record<string, string | null | undefined>, jsxStyleProps: JsxStyleProps = 'all', component = 'Box', )
| 76 | * Generates function and JSX examples for a style property |
| 77 | */ |
| 78 | export const generateJsxExamples = ( |
| 79 | props: Record<string, string | null | undefined>, |
| 80 | jsxStyleProps: JsxStyleProps = 'all', |
| 81 | component = 'Box', |
| 82 | ): { functionExamples: string[]; jsxExamples: string[] } => { |
| 83 | const functionExamples = [`css({ ${formatProps(props)} })`] |
| 84 | const jsxExamples: string[] = [] |
| 85 | |
| 86 | const jsxExample = generateJsxExample(props, jsxStyleProps, component) |
| 87 | if (jsxExample) { |
| 88 | jsxExamples.push(jsxExample) |
| 89 | } |
| 90 | |
| 91 | return { functionExamples, jsxExamples } |
| 92 | } |
| 93 | |
| 94 | export type CompositionStyleType = 'text-styles' | 'layer-styles' | 'animation-styles' |
| 95 |
no test coverage detected