diff --git a/apps/vr-tests/src/stories/NewButton.stories.tsx b/apps/vr-tests/src/stories/NewButton.stories.tsx
new file mode 100644
index 0000000000000..ce5e5173367f3
--- /dev/null
+++ b/apps/vr-tests/src/stories/NewButton.stories.tsx
@@ -0,0 +1,293 @@
+/*! Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. */
+import * as React from 'react';
+import Screener, { Steps } from 'screener-storybook/src/screener';
+import { storiesOf } from '@storybook/react';
+import { FabricDecorator } from '../utilities';
+import {
+ Button,
+ IButtonProps,
+ MenuButton,
+ IMenuButtonProps,
+ SplitButton,
+ DefaultButton,
+ PrimaryButton,
+ ActionButton,
+ BaseButton,
+ CommandBarButton,
+ CompoundButton,
+ IconButton,
+ MessageBarButton
+} from '@uifabric/experiments';
+import { Stack, Text } from 'office-ui-fabric-react';
+
+const baseProps: IButtonProps = {
+ icon: 'AddFriend',
+ content: 'Button'
+};
+
+const menuProps: IMenuButtonProps = {
+ content: 'Button',
+ menu: {
+ items: [
+ {
+ key: 'a',
+ name: 'Item a'
+ },
+ {
+ key: 'b',
+ name: 'Item b'
+ }
+ ]
+ }
+};
+
+storiesOf('Button', module)
+ .addDecorator(FabricDecorator)
+ .addDecorator(story => (
+
+ {story()}
+
+ ))
+ .addStory('Default', () => , { rtl: true })
+ .addStory('Disabled', () => )
+ .addStory('Primary', () => , { rtl: true })
+ .addStory('Primary Disabled', () => )
+ .addStory(
+ 'Multiline',
+ () => (
+
+ ),
+ { rtl: true }
+ );
+
+storiesOf('Button - Circular', module)
+ .addDecorator(FabricDecorator)
+ .addDecorator(story => (
+
+ {story()}
+
+ ))
+ .addStory('Default', () => )
+ .addStory('Disabled', () => )
+ .addStory('Primary', () => )
+ .addStory('Primary Disabled', () => );
+
+storiesOf('MenuButton', module)
+ .addDecorator(FabricDecorator)
+ .addDecorator(story => (
+
+ {story()}
+
+ ))
+ .addStory('Default', () => , { rtl: true })
+ .addStory('Disabled', () => )
+ .addStory('Primary', () => , { rtl: true })
+ .addStory('Primary Disabled', () => );
+
+storiesOf('SplitButton', module)
+ .addDecorator(FabricDecorator)
+ .addDecorator(story => (
+
+ {story()}
+
+ ))
+ .addStory('Default', () => , { rtl: true })
+ .addStory('Disabled', () => )
+ .addStory('Primary', () => , { rtl: true })
+ .addStory('Primary Disabled', () => );
+
+storiesOf('DefaultButton', module)
+ .addDecorator(FabricDecorator)
+ .addDecorator(story => (
+
+ {story()}
+
+ ))
+ .addStory('Default', () => , { rtl: true })
+ .addStory('Disabled', () => );
+
+storiesOf('PrimaryButton', module)
+ .addDecorator(FabricDecorator)
+ .addDecorator(story => (
+
+ {story()}
+
+ ))
+ .addStory('Default', () => , { rtl: true })
+ .addStory('Disabled', () => );
+
+storiesOf('ActionButton', module)
+ .addDecorator(FabricDecorator)
+ .addDecorator(story => (
+
+ {story()}
+
+ ))
+ .addStory('Default', () => , { rtl: true })
+ .addStory('Disabled', () => );
+
+storiesOf('BaseButton', module)
+ .addDecorator(FabricDecorator)
+ .addDecorator(story => (
+
+ {story()}
+
+ ))
+ .addStory('Default', () => , { rtl: true })
+ .addStory('Disabled', () => );
+
+storiesOf('CommandBarButton', module)
+ .addDecorator(FabricDecorator)
+ .addDecorator(story => (
+
+ {story()}
+
+ ))
+ .addStory('Default', () => , { rtl: true })
+ .addStory('Disabled', () => );
+
+storiesOf('CompoundButton', module)
+ .addDecorator(FabricDecorator)
+ .addDecorator(story => (
+
+ {story()}
+
+ ))
+ .addStory('Default', () => , {
+ rtl: true
+ })
+ .addStory('Disabled', () => )
+ .addStory('Primary', () => , {
+ rtl: true
+ })
+ .addStory('Primary Disabled', () => (
+
+ ));
+
+storiesOf('IconButton', module)
+ .addDecorator(FabricDecorator)
+ .addDecorator(story => (
+
+ {story()}
+
+ ))
+ .addStory('Default', () => , { rtl: true })
+ .addStory('Disabled', () => );
+
+storiesOf('MessageBarButton', module)
+ .addDecorator(FabricDecorator)
+ .addDecorator(story => (
+
+ {story()}
+
+ ))
+ .addStory('Default', () => , { rtl: true })
+ .addStory('Disabled', () => )
+ .addStory('Primary', () => , { rtl: true })
+ .addStory('Primary Disabled', () => );
diff --git a/common/changes/@uifabric/experiments/buttonVRTests_2019-05-20-23-49.json b/common/changes/@uifabric/experiments/buttonVRTests_2019-05-20-23-49.json
new file mode 100644
index 0000000000000..361a4c54efb76
--- /dev/null
+++ b/common/changes/@uifabric/experiments/buttonVRTests_2019-05-20-23-49.json
@@ -0,0 +1,11 @@
+{
+ "changes": [
+ {
+ "packageName": "@uifabric/experiments",
+ "comment": "Button: Fixing some className assignments in styling.",
+ "type": "patch"
+ }
+ ],
+ "packageName": "@uifabric/experiments",
+ "email": "Humberto.Morimoto@microsoft.com"
+}
diff --git a/packages/experiments/src/components/Button/Button.styles.ts b/packages/experiments/src/components/Button/Button.styles.ts
index 0e7e2a1e8f391..2658a51d2d19b 100644
--- a/packages/experiments/src/components/Button/Button.styles.ts
+++ b/packages/experiments/src/components/Button/Button.styles.ts
@@ -200,16 +200,18 @@ export const ButtonTokens: IButtonComponent['tokens'] = (props, theme): IButtonT
];
const GlobalClassNames = {
- icon: 'ms-Icon'
+ msButton: 'ms-Button',
+ msButtonIcon: 'ms-Button-icon'
};
export const ButtonStyles: IButtonComponent['styles'] = (props, theme, tokens): IButtonStylesReturnType => {
const { className, circular } = props;
- const globalClassNames = getGlobalClassNames(GlobalClassNames, theme, true);
+ const globalClassNames = getGlobalClassNames(GlobalClassNames, theme);
return {
root: [
+ globalClassNames.msButton,
!circular && getFocusStyle(theme, { inset: 1, outlineColor: tokens.outlineColor }),
circular && {
selectors: {
@@ -279,7 +281,7 @@ export const ButtonStyles: IButtonComponent['styles'] = (props, theme, tokens):
}
}
},
- [`:hover .${globalClassNames.icon}`]: {
+ [`:hover .${globalClassNames.msButtonIcon}`]: {
color: tokens.iconColorHovered,
selectors: {
@@ -288,7 +290,7 @@ export const ButtonStyles: IButtonComponent['styles'] = (props, theme, tokens):
}
}
},
- [`:active .${globalClassNames.icon}`]: {
+ [`:active .${globalClassNames.msButtonIcon}`]: {
color: tokens.iconColorPressed,
selectors: {
@@ -317,6 +319,7 @@ export const ButtonStyles: IButtonComponent['styles'] = (props, theme, tokens):
height: '100%'
},
icon: [
+ globalClassNames.msButtonIcon,
{
display: 'flex',
fontSize: tokens.iconSize,
@@ -330,8 +333,7 @@ export const ButtonStyles: IButtonComponent['styles'] = (props, theme, tokens):
color: tokens.highContrastIconColor
}
}
- },
- globalClassNames.icon
+ }
],
content: {
overflow: 'visible',
diff --git a/packages/experiments/src/components/Button/Button.test.tsx b/packages/experiments/src/components/Button/Button.test.tsx
index 7d6ebba49af6e..8c1f58e683533 100644
--- a/packages/experiments/src/components/Button/Button.test.tsx
+++ b/packages/experiments/src/components/Button/Button.test.tsx
@@ -4,7 +4,7 @@ import * as renderer from 'react-test-renderer';
import { CommandBar, Icon, Text } from 'office-ui-fabric-react';
import { Button } from './Button';
-describe('Button view', () => {
+describe('Button', () => {
it('renders a default Button with content correctly', () => {
const component = renderer.create();
const tree = component.toJSON();
diff --git a/packages/experiments/src/components/Button/ButtonVariants.test.tsx b/packages/experiments/src/components/Button/ButtonVariants.test.tsx
index ea558341dbd6b..a651366cd6cbf 100644
--- a/packages/experiments/src/components/Button/ButtonVariants.test.tsx
+++ b/packages/experiments/src/components/Button/ButtonVariants.test.tsx
@@ -3,7 +3,7 @@ import * as renderer from 'react-test-renderer';
import { ActionButton, CommandBarButton, CompoundButton, DefaultButton, IconButton, MessageBarButton, PrimaryButton } from './index';
-describe('Button view', () => {
+describe('Button Variants', () => {
it('renders a DefaultButton correctly', () => {
const component = renderer.create();
const tree = component.toJSON();
diff --git a/packages/experiments/src/components/Button/MenuButton/MenuButton.styles.ts b/packages/experiments/src/components/Button/MenuButton/MenuButton.styles.ts
index 746b80759204a..f7443c213f91a 100644
--- a/packages/experiments/src/components/Button/MenuButton/MenuButton.styles.ts
+++ b/packages/experiments/src/components/Button/MenuButton/MenuButton.styles.ts
@@ -1,5 +1,5 @@
import { IMenuButtonComponent, IMenuButtonStylesReturnType, IMenuButtonTokenReturnType } from './MenuButton.types';
-import { HighContrastSelector } from '../../../Styling';
+import { getGlobalClassNames, HighContrastSelector } from '../../../Styling';
const baseTokens: IMenuButtonComponent['tokens'] = (props, theme): IMenuButtonTokenReturnType => {
return {
@@ -63,11 +63,19 @@ export const MenuButtonTokens: IMenuButtonComponent['tokens'] = (props, theme):
export const MenuButtonStyles: IMenuButtonComponent['styles'] = (props, theme, tokens): IMenuButtonStylesReturnType => {
const { className } = props;
+ const globalClassNames = getGlobalClassNames(
+ {
+ msMenuButton: 'ms-MenuButton'
+ },
+ theme
+ );
+
return {
root: {
display: 'inline-flex'
},
button: [
+ globalClassNames.msMenuButton,
{
backgroundColor: props.expanded ? tokens.backgroundColorExpanded : tokens.backgroundColor,
borderColor: tokens.borderColor,
diff --git a/packages/experiments/src/components/Button/MenuButton/MenuButton.test.tsx b/packages/experiments/src/components/Button/MenuButton/MenuButton.test.tsx
index 503e9183ac6a0..d6204373e9853 100644
--- a/packages/experiments/src/components/Button/MenuButton/MenuButton.test.tsx
+++ b/packages/experiments/src/components/Button/MenuButton/MenuButton.test.tsx
@@ -18,7 +18,7 @@ const menuProps: IMenuButtonProps['menu'] = {
]
};
-describe('MenuButton view', () => {
+describe('MenuButton', () => {
it('renders a MenuButton correctly', () => {
const component = renderer.create();
const tree = component.toJSON();
diff --git a/packages/experiments/src/components/Button/SplitButton/SplitButton.test.tsx b/packages/experiments/src/components/Button/SplitButton/SplitButton.test.tsx
index 747dd3e7485ba..d0bb9702e142c 100644
--- a/packages/experiments/src/components/Button/SplitButton/SplitButton.test.tsx
+++ b/packages/experiments/src/components/Button/SplitButton/SplitButton.test.tsx
@@ -17,7 +17,7 @@ const menuProps: ISplitButtonProps['menu'] = {
]
};
-describe('SplitButton view', () => {
+describe('SplitButton', () => {
it('renders a SplitButton correctly', () => {
const component = renderer.create();
const tree = component.toJSON();
diff --git a/packages/experiments/src/components/Button/__snapshots__/Button.test.tsx.snap b/packages/experiments/src/components/Button/__snapshots__/Button.test.tsx.snap
index 4db672709c065..fd06bace17182 100644
--- a/packages/experiments/src/components/Button/__snapshots__/Button.test.tsx.snap
+++ b/packages/experiments/src/components/Button/__snapshots__/Button.test.tsx.snap
@@ -1,9 +1,9 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`Button view renders a default Button with content correctly 1`] = `
+exports[`Button renders a default Button with content correctly 1`] = `