Skip to content

Commit

Permalink
Fix useTheme hook helper (#2811)
Browse files Browse the repository at this point in the history
* fix(design-system): fix themedvalue helper

* fix(design-system): fix themedvalue helper
  • Loading branch information
CarlosCortizasCT authored May 8, 2024
1 parent 9ae9f0f commit a0626f7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/fresh-suns-count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@commercetools-uikit/design-system': patch
---

Fixes the `themedValue` helper exported from the `useTheme` hook so it always return the right-hand side parameter as we now want to always use the "new" themed values.
2 changes: 1 addition & 1 deletion design-system/src/theme-provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ const useTheme = (parentSelector = defaultParentSelector): TUseThemeResult => {
// TODO - make sure old and new theme return same value as new defaultThemeValue
// At least for the remaining places that we still use this function
const themedValue: TUseThemeResult['themedValue'] = useCallback(
(defaultThemeValue, _newThemeValue) => defaultThemeValue,
(_defaultThemeValue, newThemeValue) => newThemeValue,
[]
);

Expand Down

0 comments on commit a0626f7

Please sign in to comment.