Skip to content

Commit

Permalink
feat(plugins): add typography plugin support (#44)
Browse files Browse the repository at this point in the history
Add support for the Typography plugin and its classes.
  • Loading branch information
pspeter3 authored Sep 4, 2020
1 parent 5cc4a90 commit 7b8eabb
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/cli/GeneratedFileWriter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ export class GeneratedFileWriter {
? '\n | TCustomFormsPluginClasses'
: '',
)
.replace(
/TYPOGRAPHY_PLUGIN_TYPE/g,
this.configFileData.includes('@tailwindcss/typography')
? '\n | TTypographyPluginClasses'
: '',
)
.replace(
/IMPORTED_T_CUSTOM_CLASSES/g,
this.isCustomClassesAdded ? '\n | TCustomClassesFromExternalFile' : '',
Expand Down
9 changes: 8 additions & 1 deletion src/cli/utils/baseTemplateString.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ export type TCustomFormsPluginClasses =
| 'form-checkbox'
| 'form-radio'
export type TTypographyPluginClasses =
| 'prose'
| 'prose-sm'
| 'prose-lg'
| 'prose-xl'
| 'prose-2xl'
export type TClasses =
| TLayout
| TTypography
Expand All @@ -27,7 +34,7 @@ export type TClasses =
| TTransitionsAndAnimations
| TInteractivity
| TSVG
| TAccessibility CUSTOM_FORMS_PLUGIN_TYPE IMPORTED_T_CUSTOM_CLASSES
| TAccessibility CUSTOM_FORMS_PLUGIN_TYPE TYPOGRAPHY_PLUGIN_TYPE IMPORTED_T_CUSTOM_CLASSES
| TPseudoClasses;
Expand Down
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12348,6 +12348,8 @@ export type TCustomFormsPluginClasses =
| 'form-checkbox'
| 'form-radio';

export type TTypographyPluginClasses = 'prose' | 'prose-sm' | 'prose-lg' | 'prose-xl' | 'prose-2xl';

export type TClasses =
| TLayout
| TTypography
Expand Down

0 comments on commit 7b8eabb

Please sign in to comment.