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 / vercel-refactored.html
Created August 20, 2020 07:50
Figma refactored Vercel SVG
<svg
width="1"
height="1"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<g clip-path="url(#clip0)">
<path d="M1 0.938607H0L0.5 0.0615234L1 0.938607Z" fill="#626262" />
</g>
@DopamineDriven
DopamineDriven / vercel.html
Created August 20, 2020 07:47
Vercel Icon
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
aria-hidden="true"
focusable="false"
width="1em"
height="1em"
style="-ms-transform: rotate(360deg); -webkit-transform: rotate(360deg); transform: rotate(360deg);"
preserveAspectRatio="xMidYMid meet"
viewBox="0 0 24 24"
import {
library,
IconDefinition,
IconLookup
} from '@fortawesome/fontawesome-svg-core';
[min-x min-y width height]
@DopamineDriven
DopamineDriven / example.ts
Created August 20, 2020 07:42
Example of CustomIcon
const CustomIconExample: IconDefinition & IconLookup = {
prefix: 'fab',
iconName: 'example-icon',
icon: [
64, // viewBox width
64, // viewBox height
[], // ligatures
'#000000', // fill/fillColor
'M24 22.525H0' // iconPath(s)
]
export interface IconDefinition extends IconLookup {
icon: [
number, // width
number, // height
string[], // ligatures
string, // unicode
IconPathData // svgPathData -> string | string[]
];
}
@DopamineDriven
DopamineDriven / index.d.ts
Created August 20, 2020 07:31
IconLookup Interface Inspection
export type IconPrefix = "fas" | "fab" | "far" | "fal" | "fad";
export type IconPathData = string | string[]
export interface IconLookup {
prefix: IconPrefix;
// IconName is defined in the code that will be generated at build time and bundled with this file.
iconName: IconName;
}
export type IconName = '500px' |
@DopamineDriven
DopamineDriven / index.d.ts
Created August 20, 2020 07:28
fontawesome-common-types
export type IconPrefix = "fas" | "fab" | "far" | "fal" | "fad";
export type IconPathData = string | string[]
export interface IconLookup {
prefix: IconPrefix;
// IconName is defined in the code that will be generated at build time and bundled with this file.
iconName: IconName;
}
export interface IconDefinition extends IconLookup {
import {IconDefinition, IconLookup, IconName, IconPrefix, IconPathData, IconPack } from '@fortawesome/fontawesome-common-types';
export {IconDefinition, IconLookup, IconName, IconPrefix, IconPathData, IconPack } from '@fortawesome/fontawesome-common-types';
export const dom: DOM;
export const library: Library;
export const parse: { transform(transformString: string): Transform };
export const config: Config;
export function noAuto():void;
export function findIconDefinition(iconLookup: IconLookup): IconDefinition;
export function text(content: string, params?: TextParams): Text;
export function counter(content: string | number, params?: CounterParams): Counter;
@DopamineDriven
DopamineDriven / create required config files and the src directory
Created June 30, 2020 02:23
create required config files and the src directory
$ touch .env .eslintrcjson tsconfig.json && mkdir src && cd src && touch index.ts && cd ..