Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
liamdebeasi committed Nov 18, 2024
1 parent b0f3b44 commit fec169d
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions packages/core/src/parsers/builder/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@ const getActionBindingsFromBlock = (
};

const getStyleStringFromBlock = (block: BuilderElement, options: BuilderToMitosisOptions) => {
let styleBindings: any = {};
const styleBindings: any = {};
let styleString = '';

const responsiveStyles: Record<string, any> = {};
const responsiveStyles: Record<string, Record<string, string>> = {};

if (block.bindings) {
for (const key in block.bindings) {
Expand Down Expand Up @@ -147,13 +147,8 @@ const getStyleStringFromBlock = (block: BuilderElement, options: BuilderToMitosi

// All binding values are strings, so stringify media query objects
for (const key in responsiveStyles) {
responsiveStyles[key] = JSON.stringify(responsiveStyles[key]);
styleBindings[key] = JSON.stringify(responsiveStyles[key]);
}

styleBindings = {
...styleBindings,
...responsiveStyles,
};
}

const styleKeys = Object.keys(styleBindings);
Expand Down

0 comments on commit fec169d

Please sign in to comment.