office-ui-fabric-react#css TypeScript Examples

The following examples show how to use office-ui-fabric-react#css. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: index.tsx    From azure-serverless-workshop with MIT License 6 votes vote down vote up
public render(): JSX.Element {
    const { disabled, checked } = this.props;

    return (
      <div className={css(classNames.loginActionButton)}>
          {auth.isLoggedIn() ? (
            <ActionButton
            data-automation-id="test"
            iconProps={{ iconName: 'AddFriend' }}
            allowDisabledFocus={true}
            disabled={disabled}
            checked={checked}
            onClick={event => {
              event.preventDefault()
              auth.logout()
              }}>
              Sign out ({auth.getUserName()})
            </ActionButton>
          ) : (
            <ActionButton
            data-automation-id="test"
            iconProps={{ iconName: 'AddFriend' }}
            allowDisabledFocus={true}
            disabled={disabled}
            checked={checked}
            onClick={event => {
              event.preventDefault()
              auth.login()
              }}>
              Sign in
            </ActionButton>
          )}
      </div>
    );
  }