Skip to content

Commit

Permalink
feat: generate transition timing function and delay from theme
Browse files Browse the repository at this point in the history
  • Loading branch information
muhammadsammy committed Jun 24, 2020
1 parent c4819e2 commit 5842b6e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/generation/ClassesGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,12 @@ export class ClassesGenerator implements IClassesGenerator {
property => 'transition-' + property,
),
transitionDuration: Object.keys(this.configScanner.themeConfig.transitionDuration).map(
duration => 'duration-' + duration,
value => 'duration-' + value,
),
transitionTimingFunction: Object.keys(this.configScanner.themeConfig.transitionTimingFunction).map(
value => 'ease-' + value,
),
transitionDelay: Object.keys(this.configScanner.themeConfig.transitionDelay).map(value => 'delay-' + value),
};

this.allGeneratedClasses.Transitions = Transitions;
Expand Down
3 changes: 3 additions & 0 deletions src/generation/_definitions.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,4 +186,7 @@ interface IThemeProps {
transitionDuration: {
[key: string]: string;
};
transitionDelay: {
[key: string]: string;
};
}

0 comments on commit 5842b6e

Please sign in to comment.