Skip to content

Commit 4830d47

Browse files
authored
Merge branch 'next/fluentui' into merge/main-to-next
2 parents d2e3d06 + 40b87f9 commit 4830d47

File tree

4 files changed

+28
-1
lines changed

4 files changed

+28
-1
lines changed

packages/mgt-components/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@
77

88
export * from './components/components';
99
export * from './graph/types';
10+
export * from './styles/theme-manager';

packages/mgt-spfx-utils/package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
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",
@@ -39,5 +43,8 @@
3943
"devDependencies": {},
4044
"resolutions": {
4145
"react": "16.13.1"
46+
},
47+
"publishConfig": {
48+
"access": "public"
4249
}
4350
}

samples/sp-webpart/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
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",

stories/components/theme-toggle/themeToggle.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff 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+
6080
export const localization = () => html`
6181
<mgt-theme-toggle></mgt-theme-toggle>
6282
<style>

0 commit comments

Comments
 (0)