Skip to content

Commit

Permalink
fixed checkbox syncing
Browse files Browse the repository at this point in the history
  • Loading branch information
andreiinc committed May 25, 2020
1 parent f702d80 commit f791dac
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/scripts/modules/globals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const CMD = figma.command;
*/
export let notificationTimeout = 6000;
export let framesPerContainer = 5;
export let addPreviousStyleToDescription = true;
export let addPreviousStyleToDescription = false;
export const counter = {
applied: 0,
created: 0,
Expand Down
7 changes: 5 additions & 2 deletions src/scripts/modules/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
strokeer,
stylersWithoutTexter,
texter,
addPreviousStyleToDescription,
} from './globals';
import { changeColor, cleanSelection, createFrameLayer, createTextLayer, ungroupToCanvas } from './layers';
import { addAffixTo, chunk, figmaNotifyAndClose, groupBy, isArrayEmpty, ucFirst, uniq } from './utils';
Expand Down Expand Up @@ -102,7 +103,7 @@ export class Styler {
let previousName;
!idMatch ? (previousName = '') : (previousName = idMatch.name);

return (style.description = `Previous named style:\n${previousName}`);
return (style.description = `Previous style:\n${previousName}`);
};

renameStyle = (layer: SceneNode, style: BaseStyle) => {
Expand All @@ -115,7 +116,9 @@ export class Styler {
};

updateStyle = (layer: SceneNode, style: BaseStyle) => {
this.changeStyleDescription(layer, style);
if (addPreviousStyleToDescription) {
this.changeStyleDescription(layer, style);
}

this.detachStyle(layer);
this.styleProps.map((prop, index) => {
Expand Down
2 changes: 1 addition & 1 deletion src/styles/components/figma-ds-fixes.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.checkbox__box:checked + .checkbox__label:before {
background-position: center;
background-position: center !important;
}

0 comments on commit f791dac

Please sign in to comment.