Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
@import '~office-ui-fabric/src/sass/Fabric.Common';

.ms-BasicButtonsExample .ms-Button {
margin: 10px 0;

.ms-Icon {
@include margin-right(5px);
@include margin-left(-10px);
}
}

6 changes: 6 additions & 0 deletions src/demo/pages/ButtonPage/examples/Button.Basic.Example.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ export class ButtonBasicExample extends React.Component<any, IBasicButtonsExampl
<Label>Command button</Label>
<Button disabled={ disabled } buttonType={ ButtonType.command } icon='personAdd' description='Description of the action this button takes'>Create account</Button>

<Label>Primary Button with Icon</Label>
<Button disabled={ disabled } buttonType={ ButtonType.primary } title='Star' description='Description of the action this button takes'>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could add a classname to this button if you'd like, e.g. 'ms-ButtonBasicExample-customButton'

then your scoped css would be:

.ms-ButtonBasicExample-customButton .ms-Icon {
...
}

<i className='ms-Icon ms-Icon--star' />
<span>I am a button.</span>
</Button>

<Label>Icon button</Label>
<Button disabled={ disabled } buttonType={ ButtonType.icon } icon='star' title='Star' ariaLabel='Take a star' />

Expand Down