Skip to content

Commit

Permalink
feat: generate font weight types
Browse files Browse the repository at this point in the history
  • Loading branch information
muhammadsammy committed Jun 24, 2020
1 parent 6dbd3a7 commit 45ae183
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 26 deletions.
1 change: 1 addition & 0 deletions src/generation/ClassesGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ export class ClassesGenerator implements IClassesGenerator {
...defaultTypography,
fontFamily: Object.keys(this.configScanner.themeConfig.fontFamily).map(value => 'font-' + value),
fontSize: Object.keys(this.configScanner.themeConfig.fontSize).map(size => 'font-' + size),
fontWeight: Object.keys(this.configScanner.themeConfig.fontWeight).map(weight => 'font-' + weight),
textColor: this.getGeneratedClassesWithColors('text'),
};

Expand Down
52 changes: 26 additions & 26 deletions src/generation/_definitions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ interface IThemeConfig extends IThemeProps {
// TODO
/* eslint-disable @typescript-eslint/no-explicit-any */
interface IThemeProps {
screens?: {
screens: {
[key: string]: string;
};
colors?: {
colors: {
[key: string]: string | { [key: string]: string };
};
spacing: {
Expand All @@ -65,16 +65,16 @@ interface IThemeProps {
backgroundColor?: any;
borderColor?: any;
container?: any;
cursor?: {
cursor: {
[key: string]: string;
};
divideWidth?: {
divideWidth: {
[key: string]: string;
};
fill?: {
fill: {
[key: string]: string;
};
flex?: {
flex: {
[key: string]: string;
};
flexGrow: {
Expand All @@ -89,53 +89,53 @@ interface IThemeProps {
fontSize: {
[key: string]: string;
};
fontWeight?: {
fontWeight: {
[key: string]: string;
};
height: any;
inset?: {
inset: {
[key: string]: string;
};
letterSpacing?: {
letterSpacing: {
[key: string]: string;
};
lineHeight?: {
lineHeight: {
[key: string]: string;
};
listStyleType?: {
listStyleType: {
[key: string]: string;
};
margin: any;
maxHeight?: {
maxHeight: {
[key: string]: string;
};
maxWidth: any;
minHeight?: {
minHeight: {
[key: string]: string;
};
minWidth?: {
minWidth: {
[key: string]: string;
};
objectPosition?: {
objectPosition: {
[key: string]: string;
};
opacity?: {
opacity: {
[key: string]: string;
};
order: {
[key: string]: string;
};
padding: any;
placeholderColor: any;
stroke?: {
stroke: {
[key: string]: string;
};
strokeWidth?: {
strokeWidth: {
[key: string]: string;
};
textColor: any;
width: any;
zIndex?: {
zIndex: {
[key: string]: string;
};
gap: any;
Expand Down Expand Up @@ -164,26 +164,26 @@ interface IThemeProps {
gridRowEnd: {
[key: string]: string;
};
transformOrigin?: {
transformOrigin: {
[key: string]: string;
};
scale?: {
scale: {
[key: string]: string;
};
rotate?: {
rotate: {
[key: string]: string;
};
translate: any;
skew?: {
skew: {
[key: string]: string;
};
transitionProperty?: {
transitionProperty: {
[key: string]: string;
};
transitionTimingFunction?: {
transitionTimingFunction: {
[key: string]: string;
};
transitionDuration?: {
transitionDuration: {
[key: string]: string;
};
}

0 comments on commit 45ae183

Please sign in to comment.