Skip to content

Commit

Permalink
Change the story file name to include stories
Browse files Browse the repository at this point in the history
When we move to version 7+, this will be updated to mgt-component.js from mgt-component.stories.js

Signed-off-by: Musale Martin <[email protected]>
  • Loading branch information
musale committed Aug 3, 2023
1 parent a6900c2 commit 6ced69c
Show file tree
Hide file tree
Showing 11 changed files with 51 additions and 72 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
72 changes: 0 additions & 72 deletions stories/samples/general.stories.b.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,54 @@ clearCacheButton.addEventListener('click', onClearCacheButtonClick);
// };
</script>
`;

export const theme = () => html`
<div>
<p>This demonstrates how to set the theme globally without using a theme toggle and customize styling within specific scopes</p>
<p>Please refer to the JS and CSS tabs in the editor for implentation details</p>
<mgt-login></mgt-login>
<p>This picker shows the custom focus ring color</p>
<div class="custom-focus">
<mgt-people-picker></mgt-people-picker>
</div>
<article>
<p>I use the theme set on the body</p>
<mgt-teams-channel-picker></mgt-teams-channel-picker>
</article>
<p>I am custom themed, take care to ensure that your customizations maintain accessibility standards</p>
<mgt-teams-channel-picker class="custom1"></mgt-teams-channel-picker>
</div>
<script>
import { applyTheme } from '@microsoft/mgt';
const body = document.querySelector('body');
if(body) applyTheme('dark', body);
</script>
<style>
body {
background-color: var(--fill-color);
color: var(--neutral-foreground-rest);
font-family: var(--body-font);
}
.custom-focus {
--focus-ring-color: red;
--focus-ring-style: solid;
}
.custom1 {
--channel-picker-input-border: 2px solid teal;
--channel-picker-input-background-color: black;
--channel-picker-input-background-color-hover: #1a1a1a;
--channel-picker-search-icon-color: yellow;
--channel-picker-close-icon-color: yellow;
--channel-picker-down-chevron-color: yellow;
--channel-picker-up-chevron-color: yellow;
--channel-picker-input-placeholder-text-color: white;
--channel-picker-input-placeholder-text-color-focus: yellow;
--channel-picker-input-placeholder-text-color-hover: chartreuse;
--channel-picker-dropdown-background-color: #008383;
--channel-picker-dropdown-item-background-color-hover: #006363;
--channel-picker-font-color: white;
--channel-picker-placeholder-default-color: white;
--channel-picker-placeholder-focus-color: #441540;
}
</style>
`;

0 comments on commit 6ced69c

Please sign in to comment.