Devendra174's picture
Upload folder using huggingface_hub
1e92f2d verified
raw
history blame contribute delete
624 Bytes
import type { SystemContext } from "@chakra-ui/react"
import { pretty } from "./pretty.js"
export function generateCondition(sys: SystemContext) {
const keys = sys.conditions.keys().concat("base")
const result = `
export interface Conditions {
${keys
.map((key) => {
if (key === "base") {
return `/** The base (=no conditions) styles to apply */\n${key}: string`
}
const value = sys.conditions.resolve(key)
return `/** \`${value}\` */\n'${key}': string`
})
.join("\n")}
}
`
return pretty(result)
}