File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
packages/mgt-components/src
stories/components/theme-toggle Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change 77
88export * from './components/components' ;
99export * from './graph/types' ;
10+ export * from './styles/theme-manager' ;
Original file line number Diff line number Diff line change @@ -57,6 +57,26 @@ body {
5757 </ style >
5858` ;
5959
60+ export const themingWithoutToggle = ( ) => html `
61+ < mgt-login id ="login-one "> </ mgt-login >
62+ < mgt-login id ="login-two "> </ mgt-login >
63+ < mgt-login id ="login-three "> </ mgt-login >
64+
65+ <!-- The login components are in the default light theme on a light
66+ background. We are setting the component with id "login-two" to the dark
67+ theme colors using JavaScript. -->
68+
69+ < script >
70+ import { applyTheme } from '@microsoft/mgt' ;
71+ const loginTwo = document . querySelector ( "#login-two" ) ;
72+
73+ if ( loginTwo ) {
74+ // apply the dark theme on the second login component only.
75+ applyTheme ( 'dark' , loginTwo )
76+ }
77+ </ script >
78+ ` ;
79+
6080export const localization = ( ) => html `
6181< mgt-theme-toggle > </ mgt-theme-toggle >
6282 < style >
You can’t perform that action at this time.
0 commit comments