How to use @uifabric/icons - 8 common examples

To help you get started, we’ve selected a few @uifabric/icons 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 OfficeDev / office-ui-fabric-react / apps / fabric-website-resources / config / tests.js View on Github external
/** Jest test setup file. */

const { configure } = require('enzyme');
const { initializeIcons } = require('@uifabric/icons');
const Adapter = require('enzyme-adapter-react-16');

// Initialize icons.
initializeIcons('');

global.requestAnimationFrame = callback => {
  setTimeout(callback, 0);
};

// Configure enzyme.
configure({ adapter: new Adapter() });
github OfficeDev / office-ui-fabric-react / packages / office-ui-fabric-react / src / common / tests.ts View on Github external
/** Jest test setup file. */

import { configure } from 'enzyme';
import { initializeIcons } from '@uifabric/icons';
import * as Adapter from 'enzyme-adapter-react-16';

// Initialize icons.
initializeIcons('');

// Mock requestAnimationFrame for React 16+.
declare const global: { requestAnimationFrame: (cb: () => void) => void };

global.requestAnimationFrame = (callback: () => void) => {
  setTimeout(callback, 0);
};

// Configure enzyme.
configure({ adapter: new Adapter() });
github OfficeDev / office-ui-fabric-react / packages / experiments / config / tests.js View on Github external
/** Jest test setup file. */

const { setIconOptions } = require('office-ui-fabric-react/lib/Styling');
const { initializeIcons } = require('@uifabric/icons');
const { configure } = require('enzyme');
const Adapter = require('enzyme-adapter-react-16');

initializeIcons('');

// Suppress icon warnings.
setIconOptions({
  disableWarnings: true
});

// Mock requestAnimationFrame for React 16+.
global.requestAnimationFrame = callback => {
  setTimeout(callback, 0);
};

// Configure enzyme.
configure({ adapter: new Adapter() });
github SharePoint / sp-dev-fx-extensions / samples / react-command-print / src / extensions / print / components / print-dialog-content / print-dialog-content.tsx View on Github external
this.state = {
            hideLoading: false,
            loadingMessage: "Loading...",
            templates: [],
            items: _items,
            showPanel: false,
            hideTemplateLoading: true,
            printTemplate: null,
            selectedTemplateIndex: -1,
            itemContent: {},
            isSiteAdmin: false
        };
        this.listService = new ListService();
        // Initialize icons
        initializeIcons();
    }
github microsoft / BotFramework-Composer / Composer / packages / client / src / extension-container / ExtensionContainer.tsx View on Github external
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

import React, { useState, useEffect } from 'react';
import { initializeIcons } from '@uifabric/icons';
import { ShellData, ShellApi } from '@bfc/shared';

import ApiClient from '../messenger/ApiClient';

import getEditor from './EditorMap';

import './extensionContainer.css';

initializeIcons(undefined, { disableWarnings: true });
/**
 * ExtensionContainer is a IFrame container to host any extension as React component
 * ExtensionContainer provides a React absraction to it's inner extention, on top of the
 * underlying messaging api between ExtensionContainer and Shell
 *
 * An extension won't have to know this ExtensionContainer exists, it just use the props
 * passed into it to communite with Shell. Those props is actually implement in Container layer.
 *
 * The data and controls flows look like this
 *  Shell <---(messaging)---> Container <---(react props)---> Extension
 *
 */

const apiClient = new ApiClient();

const subEditorCallbacks = {};
github OfficeDev / office-ui-fabric-react / apps / server-rendered-app / src / index.tsx View on Github external
function start(): void {
  initializeIcons();

  _rootDiv = document.querySelector('#content');

  ReactDOM.hydrate(, _rootDiv);
}
github microsoft / BotFramework-Composer / Composer / packages / extensions / obiformeditor / demo / src / index.tsx View on Github external
import { ExpressionEngine } from 'botbuilder-expression-parser';
import { seedNewDialog, LuFile, DialogInfo, ShellApi } from '@bfc/shared';

import Example from '../../src';
import { buildDialogOptions } from '../../src/Form/utils';

import editorSchema from './editorschema.json';

import 'codemirror/mode/javascript/javascript';
import 'codemirror/lib/codemirror.css';
import 'codemirror/theme/material.css';
import 'codemirror/theme/neat.css';

import './styles.css';

initializeIcons(undefined, { disableWarnings: true });

const cmOptions = {
  theme: 'material',
  viewportMargin: Infinity,
  mode: {
    name: 'javascript',
    json: true,
    statementIndent: 2,
  },
  lineNumbers: true,
  lineWrapping: true,
  indentWithTabs: false,
  tabSize: 2,
  smartIndent: true,
};
github SharePoint / sp-dev-fx-property-controls / src / propertyFields / sitePicker / PropertyFieldSitePickerHost.tsx View on Github external
constructor(props: IPropertyFieldSitePickerHostProps) {
    super(props);
    initializeIcons();

    telemetry.track('PropertyFieldSitePicker', {
      disabled: props.disabled
    });

    this.state = {
      isLoading: false,
      selectedSites: [],
      siteSearchResults: [],
      errorMessage: null
    };

    this.async = new Async(this);

    this.searchService = new SPSiteSearchService();
  }

@uifabric/icons

Fluent UI React icon set.

MIT
Latest version published 2 years ago

Package Health Score

75 / 100
Full package analysis

Popular @uifabric/icons functions