Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(theme): avoid using Proxy to generate theme variables
- Loading branch information
Showing
14 changed files
with
223 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
'@remirror/theme': minor | ||
'@remirror/extension-react-tables': patch | ||
'@remirror/extension-text-color': patch | ||
'storybook-react': patch | ||
--- | ||
|
||
Deprecate `getTheme` and `getThemeProps` in favour of new methods `getThemeVar` and `getThemeVarName`. | ||
|
||
This removes a code path that used an ES6 Proxy, which cannot be polyfilled. | ||
|
||
``` | ||
getTheme((t) => t.color.primary.text) => `var(--rmr-color-primary-text)` | ||
getThemeProps((t) => t.color.primary.text) => `--rmr-color-primary-text` | ||
``` | ||
|
||
``` | ||
getThemeVar('color', 'primary', 'text') => `var(--rmr-color-primary-text)` | ||
getThemeVarName('color', 'primary', 'text') => `--rmr-color-primary-text` | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.