-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug: azure-theme CommandBar styles (#13959)
* Azure-theme command bar and command bar button style updates * Change files Co-authored-by: Jackie <jagaheri@microsoft.com>
- Loading branch information
1 parent
d43db14
commit 8df4df3
Showing
10 changed files
with
126 additions
and
11 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
change/@uifabric-azure-themes-2020-07-08-21-33-56-jackieg-azuretheme-commandbar.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "patch", | ||
"packageName": "@uifabric/azure-themes", | ||
"email": "jagaheri@microsoft.com", | ||
"dependentChangeType": "patch", | ||
"date": "2020-07-09T04:33:56.096Z" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,4 +92,7 @@ export interface IAzureSemanticColors { | |
backrgound: string; | ||
}; | ||
}; | ||
commandBar: { | ||
border: string; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
88 changes: 88 additions & 0 deletions
88
packages/azure-themes/src/stories/components/commandBar.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
import * as React from 'react'; | ||
import { CommandBar, ICommandBarItemProps } from 'office-ui-fabric-react/lib/CommandBar'; | ||
import { IButtonProps } from 'office-ui-fabric-react/lib/Button'; | ||
|
||
const overflowProps: IButtonProps = { ariaLabel: 'More commands' }; | ||
|
||
export const CommandBarBasicExample: React.FunctionComponent = () => { | ||
return ( | ||
<div> | ||
<CommandBar | ||
items={_items} | ||
overflowItems={_overflowItems} | ||
overflowButtonProps={overflowProps} | ||
farItems={_farItems} | ||
ariaLabel="Use left and right arrow keys to navigate between commands" | ||
/> | ||
</div> | ||
); | ||
}; | ||
|
||
const _items: ICommandBarItemProps[] = [ | ||
{ | ||
key: 'newItem', | ||
text: 'Add', | ||
cacheKey: 'myCacheKey', // changing this key will invalidate this item's cache | ||
iconProps: { iconName: 'Add' }, | ||
// subMenuProps: { | ||
// items: [ | ||
// { | ||
// key: 'emailMessage', | ||
// text: 'Email message', | ||
// iconProps: { iconName: 'Mail' }, | ||
// ['data-automation-id']: 'newEmailButton', // optional | ||
// }, | ||
// { | ||
// key: 'calendarEvent', | ||
// text: 'Calendar event', | ||
// iconProps: { iconName: 'Calendar' }, | ||
// }, | ||
// ], | ||
// }, | ||
}, | ||
{ | ||
key: 'upload', | ||
text: 'Upload', | ||
iconProps: { iconName: 'Upload' }, | ||
href: 'https://developer.microsoft.com/en-us/fluentui', | ||
}, | ||
{ | ||
key: 'share', | ||
text: 'Share', | ||
iconProps: { iconName: 'Share' }, | ||
onClick: () => console.log('Share'), | ||
}, | ||
{ | ||
key: 'download', | ||
text: 'Download', | ||
iconProps: { iconName: 'Download' }, | ||
onClick: () => console.log('Download'), | ||
}, | ||
]; | ||
|
||
const _overflowItems: ICommandBarItemProps[] = [ | ||
{ key: 'move', text: 'Move to...', onClick: () => console.log('Move to'), iconProps: { iconName: 'MoveToFolder' } }, | ||
{ key: 'copy', text: 'Copy to...', onClick: () => console.log('Copy to'), iconProps: { iconName: 'Copy' } }, | ||
{ key: 'rename', text: 'Rename...', onClick: () => console.log('Rename'), iconProps: { iconName: 'Edit' } }, | ||
]; | ||
|
||
const _farItems: ICommandBarItemProps[] = [ | ||
{ | ||
key: 'tile', | ||
text: 'Grid view', | ||
// This needs an ariaLabel since it's icon-only | ||
ariaLabel: 'Grid view', | ||
iconOnly: true, | ||
iconProps: { iconName: 'Tiles' }, | ||
onClick: () => console.log('Tiles'), | ||
}, | ||
{ | ||
key: 'info', | ||
text: 'Info', | ||
// This needs an ariaLabel since it's icon-only | ||
ariaLabel: 'Info', | ||
iconOnly: true, | ||
iconProps: { iconName: 'Info' }, | ||
onClick: () => console.log('Info'), | ||
}, | ||
]; |