Skip to content

Commit

Permalink
fix(sketch): remove styleType param from syncThemeColorStyles
Browse files Browse the repository at this point in the history
  • Loading branch information
emyarod committed Feb 11, 2021
1 parent 37584d7 commit a59ef7a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/sketch/src/commands/themes/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export function generate() {
command('commands/themes/generate', () => {
const document = Document.getSelectedDocument();
const page = selectPage(findOrCreatePage(document, 'themes'));
const sharedStyles = syncThemeColorStyles(document, 'fill');
const sharedStyles = syncThemeColorStyles(document);

const tokens = groupByKey(sharedStyles, (sharedStyle) => {
const [_namespace, _category, _group, token] = sharedStyle.name.split(
Expand Down
2 changes: 1 addition & 1 deletion packages/sketch/src/commands/themes/sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ import { syncThemeColorStyles } from '../../sharedStyles/themes';
export function sync() {
command('commands/themes/sync', () => {
const document = Document.getSelectedDocument();
syncThemeColorStyles(document, 'fill');
syncThemeColorStyles(document);
});
}
4 changes: 1 addition & 3 deletions packages/sketch/src/sharedStyles/themes.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ const { colors } = tokens;
/**
* Sync theme color shared styles to the given document and return the result
* @param {Document} document
* @param {string} styleType
* @returns {Array<SharedStyle>}
*/
export function syncThemeColorStyles(document, styleType) {
export function syncThemeColorStyles(document) {
const themes = {
'White theme': white,
'Gray 10 theme': g10,
Expand All @@ -48,7 +47,6 @@ export function syncThemeColorStyles(document, styleType) {
document,
name,
value: themes[theme][token],
type: styleType,
});
});
});
Expand Down

0 comments on commit a59ef7a

Please sign in to comment.