From a810774c143b5dcfa6bd478dd64499dce20eee74 Mon Sep 17 00:00:00 2001 From: Adam Butterworth Date: Thu, 29 Apr 2021 10:02:32 -0400 Subject: [PATCH 1/2] feat: add theme js --- README.rst | 2 +- paragon/theme.js | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 paragon/theme.js diff --git a/README.rst b/README.rst index 18e98b3f..4ef18e3c 100644 --- a/README.rst +++ b/README.rst @@ -49,4 +49,4 @@ Files this package must make available :alt: favicon :width: 32px -``/paragon/fonts.scss``, ``/paragon/_variables.scss``, ``/paragon/_overrides.scss`` A SASS theme for `@edx/paragon `_. Theming documentation in Paragon is coming soon. In the meantime, you can start a theme by the contents of `_variables.scss (after line 7) `_ file from the Paragon repository into this file. +``/paragon/theme.js``, ``/paragon/fonts.scss``, ``/paragon/_variables.scss``, ``/paragon/_overrides.scss`` A CSS-in-JS and SASS theme for `@edx/paragon `_. Theming documentation in Paragon is coming soon. In the meantime, you can start a theme by the contents of `_variables.scss (after line 7) `_ file from the Paragon repository into this file. diff --git a/paragon/theme.js b/paragon/theme.js new file mode 100644 index 00000000..d4ba8cd1 --- /dev/null +++ b/paragon/theme.js @@ -0,0 +1,10 @@ +// The theme.js for Paragon. The structure of this object follows the +// theme specification found here: https://system-ui.com/theme/. Theme values +// not defined here will fallback to their Paragon defaults. + +const theme = { + +}; + +export default theme; + From a7b08f7006d619cdfef48bca5a6e9b83fbfc2ef3 Mon Sep 17 00:00:00 2001 From: Ben Warzeski Date: Thu, 6 May 2021 15:40:55 -0400 Subject: [PATCH 2/2] use function-form theme to override complex paragon theme --- paragon/theme.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/paragon/theme.js b/paragon/theme.js index d4ba8cd1..b7b05459 100644 --- a/paragon/theme.js +++ b/paragon/theme.js @@ -2,9 +2,10 @@ // theme specification found here: https://system-ui.com/theme/. Theme values // not defined here will fallback to their Paragon defaults. -const theme = { +const applyTheme = (oldTheme) => { + const theme = { ...oldTheme }; + return theme; +} -}; - -export default theme; +export default applyTheme;