diff --git a/samples/react-themes/README.md b/samples/react-themes/README.md index 302ff58f2..e4f89d5cc 100644 --- a/samples/react-themes/README.md +++ b/samples/react-themes/README.md @@ -21,6 +21,7 @@ react-themes | Alex Terentiev ([Sharepointalist Inc.](http://www.sharepointalist Version|Date|Comments -------|----|-------- 1.0|April 27, 2017|Initial release +1.1|May 8, 2017| themePrimary variable example added ## Disclaimer **THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.** diff --git a/samples/react-themes/assets/themes.png b/samples/react-themes/assets/themes.png index 52d02184a..f0e1dad12 100644 Binary files a/samples/react-themes/assets/themes.png and b/samples/react-themes/assets/themes.png differ diff --git a/samples/react-themes/src/webparts/themes/components/Themes.module.scss b/samples/react-themes/src/webparts/themes/components/Themes.module.scss index bd32af8ca..005e08544 100644 --- a/samples/react-themes/src/webparts/themes/components/Themes.module.scss +++ b/samples/react-themes/src/webparts/themes/components/Themes.module.scss @@ -1,8 +1,13 @@ $primary: "[theme:primaryBackground, default: #0273eb]"; $primaryText: "[theme:primaryText, default: #333333]"; +$themePrimary: "[theme:themePrimary, default: #0078d7]"; .main { background: $primary; color: $primaryText; font-size: 14px; + + .themePrimary { + background: $themePrimary; + } } \ No newline at end of file diff --git a/samples/react-themes/src/webparts/themes/components/Themes.tsx b/samples/react-themes/src/webparts/themes/components/Themes.tsx index adc9255f3..0dd5d6616 100644 --- a/samples/react-themes/src/webparts/themes/components/Themes.tsx +++ b/samples/react-themes/src/webparts/themes/components/Themes.tsx @@ -37,11 +37,12 @@ export default class Themes extends React.Component { return (

{'This web part shows usage of SharePoint Themes.'}

-

{'Background color is set to "primaryBackgroud" and font color is set to "primaryColor"'}

+

{'Background color of paragraphs is set to "primaryBackgroud", variables list backogrud color is set to "themePrimary", font color is set to "primaryColor"'}

{'Full list of available theme variables is available in windows.__themeState__.theme property and listed below'}

{'You can use theme variables in your .scss files like $yourVariable:"[theme:primaryBackground, default:#0273eb]"'}

{'Change the theme (Site Settings -> Change the look) and see what\'s happenning'}