Skip to content

Commit a232284

Browse files
vogtnnmetulev
andauthored
[teams-channel-picker] 2.2 stories structure update (#1159)
* updating teams-channel-pickers stories to new file structure * cleanup Co-authored-by: Nikola Metulev <[email protected]> Co-authored-by: Nikola Metulev <[email protected]>
1 parent fd2ea1f commit a232284

File tree

3 files changed

+92
-8
lines changed

3 files changed

+92
-8
lines changed

stories/components/teamsChannelPicker.stories.js renamed to stories/components/teamsChannelPicker/teamsChannelPicker.a.js

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77

88
import { html } from 'lit-element';
9-
import { withCodeEditor } from '../../.storybook/addons/codeEditorAddon/codeAddon';
9+
import { withCodeEditor } from '../../../.storybook/addons/codeEditorAddon/codeAddon';
1010

1111
export default {
1212
title: 'Components | mgt-teams-channel-picker',
@@ -76,11 +76,25 @@ export const selectChannel = () => html`
7676
</script>
7777
`;
7878

79-
export const darkTheme = () => html`
80-
<mgt-teams-channel-picker class="mgt-dark"></mgt-teams-channel-picker>
81-
<style>
82-
body {
83-
background-color: black;
84-
}
85-
</style>
79+
export const RTL = () => html`
80+
<body dir="rtl">
81+
<mgt-teams-channel-picker></mgt-teams-channel-picker>
82+
</body>
83+
`;
84+
85+
86+
export const Localization = () => html`
87+
<mgt-teams-channel-picker></mgt-teams-channel-picker>
88+
<script>
89+
import { LocalizationHelper } from '@microsoft/mgt';
90+
LocalizationHelper.strings = {
91+
_components: {
92+
"teams-channel-picker": {
93+
inputPlaceholderText: "حدد قناة",
94+
noResultsFound: "لم يتم العثور على نتائج",
95+
loadingMessage: "جار التحميل..."
96+
}
97+
}
98+
};
99+
</script>
86100
`;
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import { html } from 'lit-element';
2+
import { withCodeEditor } from '../../../.storybook/addons/codeEditorAddon/codeAddon';
3+
4+
export default {
5+
title: 'Components / mgt-teams-channel-picker / Style',
6+
component: 'mgt-teams-channel-picker',
7+
decorators: [withCodeEditor]
8+
};
9+
10+
export const darkTheme = () => html`
11+
<mgt-teams-channel-picker class="mgt-dark"></mgt-teams-channel-picker>
12+
<style>
13+
body {
14+
background-color: black;
15+
}
16+
</style>
17+
`;
18+
19+
export const customCSSProperties = () => html`
20+
<style>
21+
mgt-teams-channel-picker {
22+
--input-border: 2px rgb(255, 0, 0) solid;
23+
24+
--input-background-color: #fcc0e5;
25+
--input-border-color--hover: #008394;
26+
--input-border-color--focus: #0f78d4;
27+
28+
--dropdown-background-color: #FF69B4;
29+
--dropdown-item-hover-background: #ff92e6;
30+
--dropdown-item-selected-background: #a10980;
31+
32+
--color: blue;
33+
--arrow-fill: #ffffff;
34+
--placeholder-color: blue;
35+
--placeholder-color--focus: rgba(255, 255, 255, 0.8);
36+
}
37+
</style>
38+
<mgt-teams-channel-picker person-query="me"></mgt-teams-channel-picker>
39+
`;
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/**
2+
* -------------------------------------------------------------------------------------------
3+
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
4+
* See License in the project root for license information.
5+
* -------------------------------------------------------------------------------------------
6+
*/
7+
8+
import { html } from 'lit-element';
9+
import { withCodeEditor } from '../../../.storybook/addons/codeEditorAddon/codeAddon';
10+
11+
export default {
12+
title: 'Components / mgt-teams-channel-picker / Templating',
13+
component: 'mgt-teams-channel-picker',
14+
decorators: [withCodeEditor]
15+
};
16+
17+
export const error = () => html`
18+
<mgt-teams-channel-picker>
19+
<template data-type="error">
20+
<p>Sorry, no Teams or Channels were found</p>
21+
</template>
22+
</mgt-teams-channel-picker>
23+
`;
24+
25+
export const loading = () => html`
26+
<mgt-teams-channel-picker>
27+
<template data-type="loading">
28+
<p>Loading results....</p>
29+
</template>
30+
</mgt-teams-channel-picker>
31+
`;

0 commit comments

Comments
 (0)