This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/hex/[Ll]ibrary/ | |
/hex/[Tt]emp/ | |
/hex/[Oo]bj/ | |
/hex/[Bb]uild/ | |
/hex/[Bb]uilds/ | |
/hex/[Ll]ogs/ | |
/hex/[Aa]ssets/AssetStoreTools* | |
![Aa]ssets/**/*.meta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"title": "JSON schema for the TypeScript compiler's configuration file", | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"definitions": { | |
"filesDefinition": { | |
"properties": { | |
"files": { | |
"description": "If no 'files' or 'include' property is present in a tsconfig.json, the compiler defaults to including all files in the containing directory and subdirectories except those specified by 'exclude'. When a 'files' property is specified, only those files and those specified by 'include' are included.", | |
"type": "array", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Document, { Html, Head, Main, NextScript } from "next/document"; | |
import { ServerStyleSheet } from "styled-components"; | |
class MyDocument extends Document { | |
static async getInitialProps(ctx) { | |
const sheet = new ServerStyleSheet(); | |
const originalRenderPage = ctx.renderPage; | |
ctx.renderPage = () => | |
originalRenderPage({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {css} from "styled-components"; | |
export function variant<R extends { variant?: keyof T }, | |
T extends { | |
[variantName: string]: ReturnType<typeof css>; | |
}>(variantMap: T) { | |
return function ({variant: variantProp}: R) { | |
return variantMap[variantProp]; | |
}; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { FC } from "react"; | |
import dynamic from "next/dynamic"; | |
import config from "../cms/config"; | |
import { useEffect, useState } from "react"; | |
import { Map } from "immutable"; | |
const wrapInClass = (Component: FC) => | |
class WrapperClass extends React.Component { | |
render() { | |
return <Component {...this.props} />; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const breakpoints = { | |
xs: "0px", | |
sm: "600px", | |
md: "960px", | |
lg: "1280px", | |
xl: "1920px" | |
}; | |
export const query = Object.entries(breakpoints).reduce( | |
(acc, [breakpoint, value]) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {useEffect, useState} from "react"; | |
import {firstToUppercase} from "../utils/js"; | |
export const breakpoints = { | |
xs: "0px", | |
sm: "600px", | |
md: "960px", | |
lg: "1280px", | |
xl: "1920px", | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getScrollbarWidth() { | |
const outer = document.createElement('div'); | |
outer.style.visibility = 'hidden'; | |
outer.style.overflow = 'scroll'; | |
document.body.appendChild(outer); | |
const inner = document.createElement('div'); | |
outer.appendChild(inner); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html { | |
font-size: max(8px, calc(8 / 1440 * 100vw)); | |
font-family: 'Poppins', sans-serif; | |
line-height: 1; | |
letter-spacing: 0.02rem; | |
} | |
body { | |
font-size: max(18px, calc(18 / 1440 * 100vw)); | |
margin: 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable react-hooks/rules-of-hooks */ | |
import {useLayoutEffect, useState} from "react"; | |
export const firstToUppercase = (string: string) => | |
string.charAt(0).toUpperCase() + string.slice(1); | |
export const breakpoints = { | |
xs: 0, | |
sm: 600, | |
md: 960, |
OlderNewer