import * as React from 'react'; import { Checkbox } from 'office-ui-fabric-react/lib/Checkbox'; import { ChoiceGroup, IChoiceGroupOption } from 'office-ui-fabric-react/lib/ChoiceGroup'; import { CommandBar } from 'office-ui-fabric-react/lib/CommandBar'; import { DefaultButton, PrimaryButton, IconButton } from 'office-ui-fabric-react/lib/Button'; import { Dropdown } from 'office-ui-fabric-react/lib/Dropdown'; import { Icon } from 'office-ui-fabric-react/lib/Icon'; import { Link } from 'office-ui-fabric-react/lib/Link'; import { MainPanelInnerContent, MainPanelNumericalWidth } from '../../shared/MainPanelStyles'; import { mergeStyles } from '@uifabric/merge-styles/lib/mergeStyles'; import { Persona, PersonaPresence } from 'office-ui-fabric-react/lib/Persona'; import { Pivot, PivotItem } from 'office-ui-fabric-react/lib/Pivot'; import { Slider } from 'office-ui-fabric-react/lib/Slider'; import { Stack } from 'office-ui-fabric-react/lib/Stack'; import { Text } from 'office-ui-fabric-react/lib/Text'; import { TextField } from 'office-ui-fabric-react/lib/TextField'; import { Toggle } from 'office-ui-fabric-react/lib/Toggle'; /* eslint-disable no-console */ export interface ISamplesProps { backgroundColor: string; textColor: string; } export interface ISamplesState { learnMoreLinkDisabled: boolean; selectOneDropdownDisabled: boolean; textFieldDisabled: boolean; checkboxOneDisabled: boolean; checkboxTwoDisabled: boolean; checkboxThreeDisabled: boolean; choicegroupDisabled: boolean; sliderDisabled: boolean; likeIconButtonDisabled: boolean; bookmarkIconButtonDisabled: boolean; sunnyIconButtonDisabled: boolean; primaryButtonDisabled: boolean; defaultButtonDisabled: boolean; } const columnSpace = 48; const columns = 3; const sampleColumn = mergeStyles({ width: (MainPanelNumericalWidth - columnSpace * (columns - 1)) / columns, }); const iconButtonStyles = mergeStyles({ color: '#0078D4', }); const commandBarItems = [ { key: 'newItem', name: 'New', cacheKey: 'myCacheKey', // changing this key will invalidate this item's cache iconProps: { iconName: 'Add', }, ariaLabel: 'New', subMenuProps: { items: [ { key: 'emailMessage', name: 'Email message', iconProps: { iconName: 'Mail', }, ['data-automation-id']: 'newEmailButton', }, { key: 'calendarEvent', name: 'Calendar event', iconProps: { iconName: 'Calendar', }, }, ], }, }, { key: 'upload', name: 'Upload', iconProps: { iconName: 'Upload', }, href: 'https://developer.microsoft.com/en-us/fluentui', ['data-automation-id']: 'uploadButton', }, { key: 'share', name: 'Share', iconProps: { iconName: 'Share', }, onClick: () => console.log('Share'), }, { key: 'download', name: 'Download', iconProps: { iconName: 'Download', }, onClick: () => console.log('Download'), }, { key: 'more', name: 'More', iconProps: { iconName: 'More', }, onClick: () => console.log('More'), }, ]; const commandBarFarItems = [ { key: 'search', ariaLabel: 'Search', iconProps: { iconName: 'Search', }, onClick: () => console.log('Search'), }, { key: 'filter', name: 'Filter', ariaLabel: 'Filter', iconProps: { iconName: 'Filter', }, iconOnly: true, onClick: () => console.log('Filter'), }, { key: 'list', name: 'List', ariaLabel: 'List', iconProps: { iconName: 'List', }, iconOnly: true, onClick: () => console.log('List'), }, ]; export class Samples extends React.Component { constructor(props: ISamplesProps) { super(props); this.state = { learnMoreLinkDisabled: false, selectOneDropdownDisabled: false, textFieldDisabled: false, checkboxOneDisabled: false, checkboxTwoDisabled: false, checkboxThreeDisabled: false, choicegroupDisabled: false, sliderDisabled: false, likeIconButtonDisabled: false, bookmarkIconButtonDisabled: false, sunnyIconButtonDisabled: false, primaryButtonDisabled: false, defaultButtonDisabled: false, }; this._onToggleChange = this._onToggleChange.bind(this); } public render() { return (
STORIES Make an impression Make a big impression with this clean, modern, and mobile-friendly site. Use it to communicate information to people inside or outisde your team. Share your ideas, results, and more in this visually compelling format. Learn more
); } private _onToggleChange() { this.setState({ learnMoreLinkDisabled: !this.state.learnMoreLinkDisabled, selectOneDropdownDisabled: !this.state.selectOneDropdownDisabled, textFieldDisabled: !this.state.textFieldDisabled, checkboxOneDisabled: !this.state.checkboxOneDisabled, checkboxTwoDisabled: !this.state.checkboxTwoDisabled, checkboxThreeDisabled: !this.state.checkboxThreeDisabled, sliderDisabled: !this.state.sliderDisabled, likeIconButtonDisabled: !this.state.likeIconButtonDisabled, bookmarkIconButtonDisabled: !this.state.bookmarkIconButtonDisabled, sunnyIconButtonDisabled: !this.state.sunnyIconButtonDisabled, primaryButtonDisabled: !this.state.primaryButtonDisabled, defaultButtonDisabled: !this.state.defaultButtonDisabled, }); } }