How to use @uifabric/fluent-theme - 10 common examples

To help you get started, we’ve selected a few @uifabric/fluent-theme examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / BotFramework-Composer / Composer / packages / client / src / components / NavItem / styles.js View on Github external
root: {
    color: active ? '#000' : '#4f4f4f',
    height: '36px',
    width: '220px',
    fontSize: `${FontSizes.size14}`,
    paddingLeft: '0px',
    paddingRight: '0px',
    marginLeft: '0px',
    backgroundColor: 'transparent',
  },
  icon: {
    color: active ? '#000' : '#4f4f4f',
    padding: '0 13px',
    marginLeft: '0px',
    boxSizing: 'border-box',
    fontSize: `${FontSizes.size16}`,
  },
  textContainer: {
    textAlign: 'left',
    zIndex: '1',
    // display: isExpand ? 'inline-block' : 'none',
  },
});
github microsoft / BotFramework-Composer / Composer / packages / client / src / components / NavItem / styles.js View on Github external
export const commandBarButton = active => ({
  root: {
    color: active ? '#000' : '#4f4f4f',
    height: '36px',
    width: '220px',
    fontSize: `${FontSizes.size14}`,
    paddingLeft: '0px',
    paddingRight: '0px',
    marginLeft: '0px',
    backgroundColor: 'transparent',
  },
  icon: {
    color: active ? '#000' : '#4f4f4f',
    padding: '0 13px',
    marginLeft: '0px',
    boxSizing: 'border-box',
    fontSize: `${FontSizes.size16}`,
  },
  textContainer: {
    textAlign: 'left',
    zIndex: '1',
    // display: isExpand ? 'inline-block' : 'none',
github microsoft / BotFramework-Composer / Composer / packages / client / src / CreationFlow / StepWizard / styles.js View on Github external
import { FontWeights } from 'office-ui-fabric-react/lib/Styling';
import { FontSizes } from '@uifabric/fluent-theme';

export const styles = {
  dialog: {
    title: {
      fontWeight: FontWeights.bold,
      fontSize: FontSizes.size20,
      paddingTop: '14px',
      paddingBottom: '11px',
    },
    subText: {
      fontSize: FontSizes.size14,
    },
  },
  modal: {
    main: {
      // maxWidth: '416px !important',
      maxWidth: '80% !important',
      width: '960px !important',
    },
  },
  halfstack: {
    root: [
      {
        flexBasis: '50%',
      },
    ],
  },
github microsoft / BotFramework-Composer / Composer / packages / client / src / components / DialogWrapper / styles.ts View on Github external
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

import { FontWeights } from 'office-ui-fabric-react/lib/Styling';
import { FontSizes } from '@uifabric/fluent-theme';
import { IDialogContentStyles } from 'office-ui-fabric-react/lib/Dialog';
import { IModalStyles } from 'office-ui-fabric-react/lib/Modal';

export const styles: { dialog: Partial; modal: Partial } = {
  dialog: {
    title: {
      fontWeight: FontWeights.bold,
      fontSize: FontSizes.size20,
      paddingTop: '14px',
      paddingBottom: '11px',
    },
    subText: {
      fontSize: FontSizes.size14,
    },
  },
  modal: {
    main: {
      maxWidth: '416px !important',
    },
  },
};
github microsoft / BotFramework-Composer / Composer / packages / client / src / CreationFlow / StepWizard / styles.js View on Github external
import { FontWeights } from 'office-ui-fabric-react/lib/Styling';
import { FontSizes } from '@uifabric/fluent-theme';

export const styles = {
  dialog: {
    title: {
      fontWeight: FontWeights.bold,
      fontSize: FontSizes.size20,
      paddingTop: '14px',
      paddingBottom: '11px',
    },
    subText: {
      fontSize: FontSizes.size14,
    },
  },
  modal: {
    main: {
      // maxWidth: '416px !important',
      maxWidth: '80% !important',
      width: '960px !important',
    },
  },
  halfstack: {
    root: [
github OfficeDev / office-ui-fabric-react / packages / example-app-base / src / components / Highlight / Highlight.tsx View on Github external
import * as javascript from 'highlight.js/lib/languages/javascript';
import { mergeStyles } from 'office-ui-fabric-react/lib/Styling';
import { NeutralColors } from '@uifabric/fluent-theme';

registerLanguage('javascript', javascript);

export interface IHighlightProps extends React.HTMLAttributes {
  componentRef?: () => void;
}

const rootClass = mergeStyles({
  selectors: {
    '.hljs': {
      display: 'block',
      color: NeutralColors.gray180,
      background: NeutralColors.gray20
    },
    '.hljs-comment, .hljs-quote': {
      color: NeutralColors.gray120,
      fontStyle: 'italic'
    },
    '.hljs-keyword, .hljs-selector-tag, .hljs-subst': {
      color: NeutralColors.gray180,
      fontWeight: 'normal'
    },
    // attribute name
    '.hljs-number, .hljs-literal, .hljs-variable, .hljs-template-variable, .hljs-tag .hljs-attr ': {
      color: '#008080'
    },
    // @param
    '.hljs-string, .hljs-doctag': {
      color: '#d14'
github OfficeDev / office-ui-fabric-react / packages / example-app-base / src / components / ExampleCard / ExampleCard.styles.ts View on Github external
isScrollable && [
        {
          WebkitOverflowScrolling: 'touch',
          maxHeight: '80vh',
          overflowX: 'hidden',
          overflowY: 'auto',
          padding: '20px 4px',
          position: 'relative'
        },
        globalClassNames.isScrollable
      ],
      isRightAligned && [{ textAlign: 'right' }, globalClassNames.isRightAligned]
    ],
    code: [
      {
        backgroundColor: NeutralColors.gray20,
        overflow: 'hidden',
        selectors: {
          pre: [
            {
              margin: 0,
              overflow: 'auto',
              transition: `all ${AnimationVariables.durationValue3} ${AnimationVariables.easeFunction1}`
            },
            // Collapse code blocks by default
            isCodeVisible ? { maxHeight: 480, minHeight: 120 } : { maxHeight: 0 },
            isCodeVisible && {
              border: '1px solid ' + NeutralColors.gray90,
              borderTop: 0
            }
          ],
          code: {
github OfficeDev / office-ui-fabric-react / packages / example-app-base / src / components / Highlight / Highlight.tsx View on Github external
registerLanguage('javascript', javascript);

export interface IHighlightProps extends React.HTMLAttributes {
  componentRef?: () => void;
}

const rootClass = mergeStyles({
  selectors: {
    '.hljs': {
      display: 'block',
      color: NeutralColors.gray180,
      background: NeutralColors.gray20
    },
    '.hljs-comment, .hljs-quote': {
      color: NeutralColors.gray120,
      fontStyle: 'italic'
    },
    '.hljs-keyword, .hljs-selector-tag, .hljs-subst': {
      color: NeutralColors.gray180,
      fontWeight: 'normal'
    },
    // attribute name
    '.hljs-number, .hljs-literal, .hljs-variable, .hljs-template-variable, .hljs-tag .hljs-attr ': {
      color: '#008080'
    },
    // @param
    '.hljs-string, .hljs-doctag': {
      color: '#d14'
    },
    '.hljs-title, .hljs-section, .hljs-selector-id': {
      color: '#900',
github OfficeDev / office-ui-fabric-react / packages / example-app-base / src / components / CodeSnippet / CodeSnippet.tsx View on Github external
SyntaxHighlighter.registerLanguage('typescript', ts);
SyntaxHighlighter.registerLanguage('scss', scss);
SyntaxHighlighter.registerLanguage('markdown', md);
SyntaxHighlighter.registerLanguage('bash', bash);
SyntaxHighlighter.registerLanguage('html', xml);

// Customize imported SyntaxHighlighter styles. Available properties:
// https://github.com/conorhastings/react-syntax-highlighter/blob/master/src/styles/hljs/github.js
style.hljs = {
  ...baseCodeStyle,
  padding: 8,
  overflowX: 'auto'
};
// Darken comment color for accessibility
style['hljs-comment'] = style['hljs-quote'] = {
  color: NeutralColors.gray120,
  fontStyle: 'italic'
};

export interface ICodeSnippetProps {
  className?: string;
  language?: string;
  styles?: IStyleFunctionOrObject;
  theme?: ITheme;
}

export type ICodeSnippetStyleProps = Pick;

export interface ICodeSnippetStyles {
  root: IStyle;
}
github OfficeDev / office-ui-fabric-react / packages / example-app-base / src / components / ExampleCard / ExampleCard.styles.ts View on Github external
],
    code: [
      {
        backgroundColor: NeutralColors.gray20,
        overflow: 'hidden',
        selectors: {
          pre: [
            {
              margin: 0,
              overflow: 'auto',
              transition: `all ${AnimationVariables.durationValue3} ${AnimationVariables.easeFunction1}`
            },
            // Collapse code blocks by default
            isCodeVisible ? { maxHeight: 480, minHeight: 120 } : { maxHeight: 0 },
            isCodeVisible && {
              border: '1px solid ' + NeutralColors.gray90,
              borderTop: 0
            }
          ],
          code: {
            display: 'block',
            margin: 12,
            fontSize: '14px'
          }
        }
      },
      isCodeVisible && {
        display: 'block',
        marginBottom: 20
      },
      globalClassNames.code
    ],