Skip to content

Instantly share code, notes, and snippets.

View SMWARREN's full-sized avatar

Sean Warren SMWARREN

View GitHub Profile
@SMWARREN
SMWARREN / gist:ea891a1e5fd7daabcb07213c549b420b
Created February 17, 2018 08:48 — forked from Mikodes/gist:be9b9ce42e46c3d4ccb6
All Media queries for resolutions
/* (320x480) iPhone (Original, 3G, 3GS) */
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) {
/* insert styles here */
}
/* (320x480) Smartphone, Portrait */
@media only screen and (device-width: 320px) and (orientation: portrait) {
/* insert styles here */
}
@SMWARREN
SMWARREN / createGlobalStore.ts
Created February 20, 2023 17:22 — forked from acorn1010/createGlobalStore.ts
Easier Zustand store
import {SetStateAction, useCallback} from 'react';
import create from "zustand";
export type EqualityFn<T> = (left: T | null | undefined, right: T | null | undefined) => boolean;
// eslint-disable-next-line @typescript-eslint/ban-types
const isFunction = (fn: unknown): fn is Function => (typeof fn === 'function');
/** Given a type `T`, returns the keys that are Optional. */
type OptionalKeys<T> =