Skip to content

Instantly share code, notes, and snippets.

@hugoabernier
Created April 22, 2018 04:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hugoabernier/ff368aaa85413279f45b4c5e357104f8 to your computer and use it in GitHub Desktop.
Save hugoabernier/ff368aaa85413279f45b4c5e357104f8 to your computer and use it in GitHub Desktop.
Update to the render() method for Part IV of the Security Classification header.
public render(): React.ReactElement<IClassificationHeaderProps> {
// get the business impact from the state
let { businessImpact } = this.state;
var barType: MessageBarType;
switch (businessImpact) {
case "MBI":
barType = MessageBarType.warning;
break;
case "HBI":
barType = MessageBarType.severeWarning;
break;
default:
barType = MessageBarType.info;
}
return (
<MessageBar
messageBarType={barType}
>
This site is classified as {this.state.businessImpact}. <Link href="www.bing.com">Learn more about the proper handling procedures.</Link>
</MessageBar>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment