Skip to content

Commit

Permalink
fix suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
jantimon committed Jul 23, 2024
1 parent 645eb87 commit 7e23cd7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/next-yak/runtime/mocks/cssLiteral.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export function css<TProps>(
}
if (dynamicCssFunctions.length === 0) {
return {
className: "css-mixin",
className: "",
style: undefined,
};
}
Expand All @@ -87,7 +87,10 @@ export function css<TProps>(
// the same way as in the real runtime
executeDynamicExpressionRecursively(props, dynamicCssFunctions[i]);
}
return {};
return {
className: "",
style: undefined,
};
}) as ComponentStyles<TProps>;
}

Expand Down
1 change: 1 addition & 0 deletions packages/next-yak/runtime/styled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ function removePrefixedProperties<T extends Record<string, unknown>>(obj: T) {
}

const mergeClassNames = (a?: string, b?: string) => {
if (!a && !b) return undefined;
if (!a) return b;
if (!b) return a;
return a + " " + b;
Expand Down

0 comments on commit 7e23cd7

Please sign in to comment.