Function
getConfig
(
config?: string,
otherCode?: string,
imports = 'import { defineConfig } from "@pandacss/dev";',
)
Source from the content-addressed store, hash-verified
| 1 | export const getConfig = ( |
| 2 | config?: string, |
| 3 | otherCode?: string, |
| 4 | imports = 'import { defineConfig } from "@pandacss/dev";', |
| 5 | ) => { |
| 6 | const conf = `${imports ?? ''}${otherCode ? `\n\n${otherCode}` : ''} |
| 7 | |
| 8 | export const config = defineConfig({ |
| 9 | ${config ?? ''}${config?.endsWith(',') ? '' : ','} |
| 10 | globalCss: { |
| 11 | html: { |
| 12 | h: 'full', |
| 13 | }, |
| 14 | body: { |
| 15 | bg: { base: 'white', _dark: '#2C2C2C' }, |
| 16 | }, |
| 17 | }, |
| 18 | jsxFramework: 'react', |
| 19 | validation: 'error', |
| 20 | });` |
| 21 | |
| 22 | return conf |
| 23 | } |
Tested by
no test coverage detected