File tree Expand file tree Collapse file tree 4 files changed +28
-1
lines changed
stories/components/theme-toggle Expand file tree Collapse file tree 4 files changed +28
-1
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 55 "main" : " ./dist/es6/index.js" ,
66 "types" : " ./dist/es6/index.d.ts" ,
77 "module" : " ./dist/es6/index.js" ,
8+ "files" : [
9+ " dist" ,
10+ " src"
11+ ],
812 "keywords" : [
913 " microsoft graph" ,
1014 " microsoft graph toolkit" ,
3943 "devDependencies" : {},
4044 "resolutions" : {
4145 "react" : " 16.13.1"
46+ },
47+ "publishConfig" : {
48+ "access" : " public"
4249 }
4350}
Original file line number Diff line number Diff line change 1313 "dependencies" : {
1414 "@microsoft/mgt-element" : " *" ,
1515 "@microsoft/mgt-react" : " *" ,
16- "@microsoft/mgt-spfx" : " *" ,
1716 "@microsoft/mgt-spfx-utils" : " *" ,
1817 "@microsoft/mgt-sharepoint-provider" : " *" ,
1918 "@microsoft/sp-core-library" : " 1.16.1" ,
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