FortAwesome
Repos
34

Events

Created at 46 minutes ago
issue comment
Icon request: icon-mendeley, icon-google-scholar

+1 for for google scholar

Created at 1 hour ago
Created at 3 hours ago
issue comment
Could not find a declaration file for module '@fortawesome/fontawesome-pro'.

Bit of feedback @tagliala: Highly recommend the docs on setup for npm list all the available npm packages as the default recommendation just says to install @fortawesome/fontawesome-pro which has no typing.

You have to look at something like the react docs to know these exist so if you're like me using Svelte, you'd never see these without googling (as I just did 😉)

Created at 6 hours ago
Created at 7 hours ago
Created at 7 hours ago
Icon request: website-call-to-action
Created at 7 hours ago
Icon request: phone-toll-free
Created at 7 hours ago

One other file needing new version number

Created at 9 hours ago
Created at 10 hours ago

Update to version 6.4.0 (#217)

Created at 11 hours ago
pull request closed
Update to version 6.4.0
Created at 11 hours ago
pull request opened
Update to version 6.4.0
Created at 11 hours ago
robmadole create branch v6.4.0
Created at 11 hours ago
Created at 11 hours ago
Add support for DuoTone

I share the same sentiment as @Studio384 so I made a workaround component in TypeScript:

import React from 'react';
import { FontAwesomeIcon, FontAwesomeIconProps } from '@fortawesome/react-fontawesome';


interface IDuotoneFontAwesomeIconProps extends FontAwesomeIconProps {

    primaryColor?: string,
    secondaryColor?: string

}


type TFontAwesomeProperties = {

 '--fa-primary-color'?: string,
 '--fa-secondary-color'?: string,

}

export function DuotoneFontAwesomeIcon(props: IDuotoneFontAwesomeIconProps) {

    const primaryColor: string | undefined = props.primaryColor;
    const secondaryColor: string | undefined = props.secondaryColor;

    const style: (React.CSSProperties & TFontAwesomeProperties) = props.style ? {...props.style} : {};
    style['--fa-primary-color'] = primaryColor;
    style['--fa-secondary-color'] = secondaryColor;

    return (

        <FontAwesomeIcon
            { ...props }
            style={ style }
        />

    )
}

With this workaround, you can use the following:

<DuotoneFontAwesomeIcon
    icon={faSomeCoolIcon}
    primaryColor={'#F0F'}
    secondaryColor={'#0FF'}
/>

Thank you @JohnPersano ! This works beautifully!! I was even able to follow your example to add in primary and secondary opacitys!! (not sure if I spelled that right) But in my app, I was able to swap the looks of the icon on click like so: image image

Created at 11 hours ago