How to use the @fortawesome/fontawesome-svg-core.config.autoAddCss function in @fortawesome/fontawesome-svg-core

To help you get started, we’ve selected a few @fortawesome/fontawesome-svg-core 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 codeforthailand / election-live / gatsby-browser.js View on Github external
})

amplitude.getInstance().init("4cac840317d8c141fff5beb87b423d59")

/**
 * Replaces the component renderer in a way that,
 * as long as we are on the same page, the component will
 * not be unmounted and remounted.
 */
export function replaceComponentRenderer({ props, loader }) {
  const Component = props.pageResources.component
  return 
}

// CSS is added in `src/styles/global.css`
fontAwesomeConfig.autoAddCss = false
github RimWorld-zh / RimTrans / packages / @rimtrans / ui / src / main.ts View on Github external
/**
 * Main
 */
// tslint:disable:no-import-side-effect
import './main.scss';
import Vue from 'vue';

// Font Awesome Icon
import { config, library } from '@fortawesome/fontawesome-svg-core';
import { fab } from '@fortawesome/free-brands-svg-icons';
import { far } from '@fortawesome/free-regular-svg-icons';
import { fas } from '@fortawesome/free-solid-svg-icons';
config.autoAddCss = false;
library.add(fab, far, fas);
import {
  FontAwesomeIcon as FaIcon,
  FontAwesomeLayers as FaLayers,
  FontAwesomeLayersText as FaLayersText,
} from '@fortawesome/vue-fontawesome';
Object.entries({ FaIcon, FaLayers, FaLayersText }).forEach(([name, comp]) =>
  Vue.component(name, comp),
);

// Void-UI
import VoidUI, { VoidUIOptions, VdTheme } from 'void-ui';
Vue.use(VoidUI);

import { wsc } from '@rimtrans/service';
github mozilla / addons-code-manager / src / configureApplication.tsx View on Github external
// to filter out historic client errors.
      scope.setTag('app_logger', 'client');
    });
  }

  if (env.NODE_ENV === 'production') {
    // The second parameter prevents the log level to be persisted in a cookie
    // or localStorage.
    _log.setLevel(log.levels.INFO, false);
  } else {
    _log.setLevel(log.levels.DEBUG, false);
  }

  // Turn off inline CSS injection for CSP. Must be before all other
  // fontawesome API calls.
  config.autoAddCss = false;

  // Import all the FontAwesome icons.
  library.add(fas, far);
};
github httptoolkit / httptoolkit.tech / src / styles.js View on Github external
import { faGithub } from '@fortawesome/free-brands-svg-icons/faGithub';
import { faStopwatch } from '@fortawesome/pro-light-svg-icons/faStopwatch';
import { faWrench } from '@fortawesome/pro-light-svg-icons/faWrench';
import { faSearch } from '@fortawesome/pro-light-svg-icons/faSearch';
import { faSpinner } from '@fortawesome/pro-light-svg-icons/faSpinner';
import { faBars } from '@fortawesome/pro-regular-svg-icons/faBars';
import { faTimes } from '@fortawesome/pro-regular-svg-icons/faTimes';
import { faInfoCircle } from '@fortawesome/pro-regular-svg-icons/faInfoCircle';
import { faChevronUp } from '@fortawesome/free-solid-svg-icons/faChevronUp';
import { faChevronDown } from '@fortawesome/free-solid-svg-icons/faChevronDown';
import { faToggleOn } from '@fortawesome/free-solid-svg-icons/faToggleOn';
import { faToggleOff } from '@fortawesome/free-solid-svg-icons/faToggleOff';
import { faCheck } from '@fortawesome/free-solid-svg-icons/faCheck';
import { faRocket } from '@fortawesome/pro-light-svg-icons/faRocket';

config.autoAddCss = false;
library.add(
    faAndroid,
    faChrome,
    faDocker,
    faTwitter,
    faFacebook,
    faRedditAlien,
    faHackerNews,
    faProductHunt,
    faDev,
    faShareAlt,
    faRssSquare,
    faWindows,
    faApple,
    faLinux,
    faGithub,
github wassgha / digital-signage / components / Admin / EditableWidget.js View on Github external
import React from 'react'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { library, config } from '@fortawesome/fontawesome-svg-core'
import {
  faPlay,
  faFont,
  faList,
  faMousePointer,
  faCloudSun,
  faCalendar,
  faTimes,
  faCog
} from '@fortawesome/free-solid-svg-icons'

config.autoAddCss = false
library.add(faList)
library.add(faPlay)
library.add(faFont)
library.add(faMousePointer)
library.add(faCloudSun)
library.add(faCalendar)

import Widgets from '../../widgets'
import WidgetEditDialog from './WidgetEditDialog'

class EditableWidget extends React.Component {
  constructor(props) {
    super(props)
    this.dialog = React.createRef()
  }
github credija / opa / plugins / vue-fontawesome.js View on Github external
export default () => {
  config.autoAddCss = false;

  library.add(faUser, faPlane, faChevronCircleRight, faCircle, 
    faClock, faTimes, faComment,
    faCheck, faMinus, faSmile, faCommentAlt,
    faBell, faBellSlash, faUserSlash, 
    faSun, faMoon, faUndo, faKey, faUserCog,
    faEnvelope, faLock, faArrowCircleRight, faLanguage, faSync);

  Vue.component('font-awesome-icon', FontAwesomeIcon);
}
github wassgha / digital-signage / widgets / weather / src / WeatherContent.js View on Github external
/**
 * @fileoverview Slideshow component that given an array of slide descriptions
 * of mixed types, renders the slides and automatically plays the slideshow for
 * the given durations
 */

import React, { Component } from 'react'
import axios from 'axios'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { config } from '@fortawesome/fontawesome-svg-core'
import { faMapMarker } from '@fortawesome/free-solid-svg-icons'

config.autoAddCss = false

import WeatherIcon from './WeatherIcon'

const DEFAULT_UNIT = 'imperial'
const DEFAULT_ZIP = '10001'
const API_KEY = 'da6ef4bf43eed800fdadd4a728766089'
const API_URL = 'http://api.openweathermap.org/data/2.5'

class WeatherContent extends Component {
  constructor(props) {
    super(props)

    this.state = {}
  }

  componentDidMount() {
github wassgha / digital-signage / widgets / congrats / src / CongratsContent.js View on Github external
/**
 * @fileoverview Slideshow component that given an array of slide descriptions
 * of mixed types, renders the slides and automatically plays the slideshow for
 * the given durations
 */

import React, { Component } from 'react'
import Lottie from 'react-lottie'
import { config } from '@fortawesome/fontawesome-svg-core'
import AutoScroll from '../../../components/AutoScroll'

config.autoAddCss = false

const DEFAULT_COLOR = '#34495e'
const DEFAULT_TEXT_COLOR = '#ffffff'
const DEFAULT_ANIMATION = 'confetti'
const DEFAULT_TEXT = 'Congratulations!'
const DEFAULT_FONT_SIZE = 16

class CongratsContent extends Component {
  render() {
    const {
      data: {
        text = DEFAULT_TEXT,
        textColor = DEFAULT_TEXT_COLOR,
        animation = DEFAULT_ANIMATION,
        fontSize = DEFAULT_FONT_SIZE,
        color = DEFAULT_COLOR
github kyma-project / website / src / common / icons.ts View on Github external
} from "@fortawesome/free-solid-svg-icons";
import {
  faEdit,
  faCopy,
  faCalendarAlt,
} from "@fortawesome/free-regular-svg-icons";
import {
  faTwitter,
  faLinkedinIn,
  faGithub,
  faSlack,
  faYoutube,
  faStackOverflow,
} from "@fortawesome/free-brands-svg-icons";

config.autoAddCss = false;

library.add(
  faExternalLinkAlt,
  faCloudDownloadAlt,
  faCalendarAlt,
  faAnchor,
  faLink,
  faTags,
  faArrowUp,
  faArrowLeft,
  faArrowRight,
  faSlidersH,
  faBook,
  faBars,
  faTimes,
  faSearch,
github wassgha / digital-signage / widgets / announcement / src / AnnouncementContent.js View on Github external
/**
 * @fileoverview Slideshow component that given an array of slide descriptions
 * of mixed types, renders the slides and automatically plays the slideshow for
 * the given durations
 */

import React, { Component } from 'react'
import { library, config } from '@fortawesome/fontawesome-svg-core'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import AutoScroll from '../../../components/AutoScroll'

import { fas } from '@fortawesome/free-solid-svg-icons'
import { fab } from '@fortawesome/free-brands-svg-icons'

config.autoAddCss = false
library.add(fas)
library.add(fab)

const DEFAULT_COLOR = '#708090'
const DEFAULT_TEXT_COLOR = '#ffffff'
const DEFAULT_ACCENT_COLOR = '#EDC951'
const DEFAULT_TEXT = ''
const DEFAULT_TITLE_TEXT_COLOR = '#fff0f0'

class AnnouncementContent extends Component {
  render() {
    const {
      data: {
        text = DEFAULT_TEXT,
        textColor = DEFAULT_TEXT_COLOR,
        titleTextColor = DEFAULT_TITLE_TEXT_COLOR,