Skip to content

Commit

Permalink
fix: scheme generate
Browse files Browse the repository at this point in the history
  • Loading branch information
mauroreisvieira committed Feb 14, 2020
1 parent 04a456b commit cbe5963
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/schemes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,37 @@ import {
generateScheme,
ISchemeSetting,
IColors,
IRules
} from '@meetio/scheme-generator';
import * as pallete from '@meetio/meetio-colors';

// common rules for all schemes
import rules from './schemes/index';

interface IScheme {
name: string;
author: string;
variables: IColors;
customRules: Array<IRules>; // specific rules for each IScheme
}

[
{
name: 'Meetio-Theme-Dark',
author: 'Mauro Reis Vieira <[email protected]>',
variables: pallete.dark,
customRules: [],
},
{
name: 'Meetio-Theme-Light',
author: 'Mauro Reis Vieira <[email protected]>',
variables: pallete.light,
customRules: [],
},
].map((item: IScheme) => {
const settings: ISchemeSetting = {
colors: item.variables,
rules: [
...rules,
...[],
],
rules: [...rules, ...item.customRules],
};
generateScheme(item.name, item.author, item.name, settings, 'schemes');
});

0 comments on commit cbe5963

Please sign in to comment.