Skip to content

Instantly share code, notes, and snippets.

View DopamineDriven's full-sized avatar
🎯
cloud hopping

Andrew Ross DopamineDriven

🎯
cloud hopping
View GitHub Profile
@DopamineDriven
DopamineDriven / npx.git
Created August 20, 2020 08:11
git command for patching
npx patch-package @fortawesome/fontawesome-common-types
diff --git a/node_modules/@fortawesome/fontawesome-common-types/index.d.ts b/node_modules/@fortawesome/fontawesome-common-types/index.d.ts
index b70b000..b6b2429 100644
--- a/node_modules/@fortawesome/fontawesome-common-types/index.d.ts
+++ b/node_modules/@fortawesome/fontawesome-common-types/index.d.ts
@@ -1,4 +1,4 @@
-export type IconPrefix = "fas" | "fab" | "far" | "fal" | "fad";
+export type IconPrefix = "fas" | "fab" | "fac" | "far" | "fal" | "fad";
export type IconPathData = string | string[]
export interface IconLookup {
@DopamineDriven
DopamineDriven / package.json
Created August 20, 2020 08:05
add postinstall script to package.json
"scripts": {
"dev": "next",
"build": "next build",
"start": "next start",
"postinstall": "npx patch-package"
}
<a
aria-label='react'
target='__blank'
href={vercel}
className='bg-customGray text-white hover:text-white hover:bg-iconHover transition-colors leading-normal duration-500 text-lg inline-block text-center items-center align-middle justify-center w-8 h-8 mx-1 my-2 pt-1 rounded-full focus:outline-none'
>
<FontAwesomeIcon
icon={faCustomVercelIcon}
className='flex align-middle text-center font-extrabold text-1xl pb-1'
size='lg'
@DopamineDriven
DopamineDriven / card-icons.tsx
Created August 20, 2020 08:01
Components; import custom icon
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faCustomVercelIcon } from '../lib/fas-custom-integration';
@DopamineDriven
DopamineDriven / fas-custom-integration.ts
Last active August 20, 2020 07:58
Part 5 complete lib file
import {
library,
IconDefinition,
IconLookup
} from '@fortawesome/fontawesome-svg-core';
export interface CustomIconConstruct extends IconDefinition, IconLookup {}
export const faCustomVercelIcon: CustomIconConstruct = {
prefix: 'fac',
@DopamineDriven
DopamineDriven / index.d.ts
Created August 20, 2020 07:56
IconPrefix type manipulation
export type IconPrefix = "fas" | "fab" | "fac" | "far" | "fal" | "fad";
@DopamineDriven
DopamineDriven / index.d.ts
Created August 20, 2020 07:55
fontawesome-common-types IconName type addition
export type IconName = 'vercel-icon' | '500px' |
'accessible-icon' |
'accusoft' |
'acquisitions-incorporated' |
// ...7,846 lines later...
'wrench' |
'x-ray' |
'yen-sign' |
'yin-yang';
@DopamineDriven
DopamineDriven / fas-custom-integration.ts
Created August 20, 2020 07:53
step 5 ft library.add()
export const faCustomVercelIcon: IconDefinition & IconLookup = {
prefix: 'fab',
iconName: 'vercel-icon',
icon: [
24,
24,
[],
'none',
'M24 22.525H0l12-21.05l12 21.05z'
]
export const faCustomVercelIcon: IconDefinition & IconLookup = {
prefix: 'fab',
iconName: 'vercel-icon',
icon: [
24,
24,
[],
'none',
'M24 22.525H0l12-21.05l12 21.05z'
]