Skip to content

Commit

Permalink
Remove Storybook font weight test setting
Browse files Browse the repository at this point in the history
  • Loading branch information
bheston committed May 5, 2022
1 parent 7b1df8f commit 65a8c54
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 10 deletions.
1 change: 0 additions & 1 deletion packages/web-components/.storybook/preview-body.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@
<span slot="checked-message">Dark</span>
<span slot="unchecked-message">Light</span>
</fluent-switch>
<fluent-slider id="font-weight" min="100" max="1000" value="400"> </fluent-slider>
</div>
1 change: 1 addition & 0 deletions packages/web-components/.storybook/preview-head.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

div.docs-story > div:first-child {
height: 12em;
padding: 30px 20px;
}

#switches-container {
Expand Down
3 changes: 1 addition & 2 deletions packages/web-components/.storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@ import { DOCS_RENDERED } from '@storybook/core-events';
import * as Fluent from '../src/index-rollup';
import { fillColor, neutralLayer1, neutralLayer2 } from '../src/design-tokens';
import webcomponentsTheme from './theme';
import { changeWeight, toggleBgMode, toggleLtr } from '../public/switches';
import { toggleBgMode, toggleLtr } from '../public/switches';

Fluent;

document.getElementById('luminance-switch').addEventListener('change', toggleBgMode, false);
document.getElementById('direction-switch').addEventListener('change', toggleLtr, false);
document.getElementById('font-weight').addEventListener('change', changeWeight, false);

export const parameters = {
layout: 'fullscreen',
Expand Down
8 changes: 1 addition & 7 deletions packages/web-components/public/switches.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Direction } from '@microsoft/fast-web-utilities';
import { baseLayerLuminance, direction, fontWeight, StandardLuminance } from '../src/index';
import { baseLayerLuminance, direction, StandardLuminance } from '../src/index';

export function toggleBgMode() {
const storyContainer = document.querySelector<HTMLElement>('.docs-story')!;
Expand All @@ -22,9 +22,3 @@ export function toggleLtr() {
direction.setValueFor(storyContainer, Direction.ltr);
}
}

export function changeWeight() {
const storyContainer = document.querySelector<HTMLElement>('.docs-story')!;
const val = this.value;
fontWeight.setValueFor(storyContainer, val);
}

0 comments on commit 65a8c54

Please sign in to comment.