forked from microsoft/fluentui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Website: Add link to Fluent for Fabric (microsoft#6585)
* Add a MessageBar at the top of the app linking to Fluent for Fabric * Add change file * Update link * Import from lib (hoping to resolve build issue) * Update root.tsx
- Loading branch information
1 parent
baceeb0
commit 296d90b
Showing
3 changed files
with
64 additions
and
10 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
apps/fabric-website/src/components/FluentMessageBar/FluentMessageBar.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,39 @@ | ||
import { Link } from 'office-ui-fabric-react/lib/Link'; | ||
import { MessageBar } from 'office-ui-fabric-react/lib/MessageBar'; | ||
import * as React from 'react'; | ||
|
||
export interface IFluentMessageBarProps {} | ||
|
||
export interface IFluentMessageBarState { | ||
isVisible: boolean; | ||
} | ||
|
||
export default class IFluentMessageBar extends React.Component<IFluentMessageBarProps, IFluentMessageBarState> { | ||
constructor(props: IFluentMessageBarProps) { | ||
super(props); | ||
|
||
this.state = { | ||
isVisible: true | ||
}; | ||
|
||
this._onClose = this._onClose.bind(this); | ||
} | ||
|
||
public render() { | ||
const { isVisible } = this.state; | ||
|
||
return ( | ||
isVisible && ( | ||
<MessageBar onDismiss={this._onClose} dismissButtonAriaLabel="Close"> | ||
Get an early look at the latest Fluent updates coming to Fabric. <Link href="https://aka.ms/fabric-preview">Learn more</Link> | ||
</MessageBar> | ||
) | ||
); | ||
} | ||
|
||
private _onClose() { | ||
this.setState({ | ||
isVisible: false | ||
}); | ||
} | ||
} |
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
11 changes: 11 additions & 0 deletions
11
common/changes/@uifabric/fabric-website/miwhea-add-fluent-message-bar_2018-10-05-20-50.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,11 @@ | ||
{ | ||
"changes": [ | ||
{ | ||
"packageName": "@uifabric/fabric-website", | ||
"comment": "Add temporary MessageBar to link to Fluent for Fabric", | ||
"type": "minor" | ||
} | ||
], | ||
"packageName": "@uifabric/fabric-website", | ||
"email": "mike@wheaton.design" | ||
} |