(prop: { type?: string; value?: unknown })
| 2 | import type { PatternSpec } from '@pandacss/types' |
| 3 | |
| 4 | const getExampleValue = (prop: { type?: string; value?: unknown }): string => { |
| 5 | if (prop.type === 'enum' && Array.isArray(prop.value) && prop.value.length > 0) { |
| 6 | return `"${prop.value[0]}"` |
| 7 | } |
| 8 | if (prop.type === 'boolean') { |
| 9 | return 'true' |
| 10 | } |
| 11 | if (prop.type === 'number') { |
| 12 | return '4' |
| 13 | } |
| 14 | if (prop.type === 'token') { |
| 15 | return '"md"' |
| 16 | } |
| 17 | return '<value>' |
| 18 | } |
| 19 | |
| 20 | export const generatePatternsSpec = (ctx: Context): PatternSpec => { |
| 21 | const jsxStyleProps = ctx.config.jsxStyleProps |
no outgoing calls
no test coverage detected