Skip to content

Commit

Permalink
feat: add pseudoclassnames to their category function
Browse files Browse the repository at this point in the history
  • Loading branch information
muhammadsammy committed Dec 12, 2021
1 parent 805396f commit 224fb7a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cli/core/FileContentGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export class FileContentGenerator {
template =
template +
this.generateTypesTemplate(
`T${keyOfCategory}PseudoClassnames`,
`${keyOfCategory}PseudoClassnames`,
pseudoClassnamesOfCategory,
undefined,
true,
Expand All @@ -128,8 +128,8 @@ export class FileContentGenerator {
// const categoryPseudoClassesTypes = '`${TPseudoClassVariants}:${' + categoryType + '}`';

return (
`type ${categoryType}Key = ${categoryType} | TTailwindString\n` +
`type ${categoryType}Arg = ${categoryType} | null | undefined | {[key in ${categoryType}Key]?: boolean} | TTailwindString\n` +
`type ${categoryType}Key = ${categoryType} | ${categoryType}PseudoClassnames | TTailwindString\n` +
`type ${categoryType}Arg = ${categoryType} | ${categoryType}PseudoClassnames | null | undefined | {[key in ${categoryType}Key]?: boolean} | TTailwindString\n` +
`type ${categoryType}UtilityFunction = (...args: ${categoryType}Arg[]) => TTailwindString\n` +
//prettier-ignore
`export const ${_.lowerFirst(categoryGroupName)}: ${categoryType}UtilityFunction = classnamesLib as any\n`
Expand Down

0 comments on commit 224fb7a

Please sign in to comment.