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, { ComponentProps, FunctionComponent, memo, useMemo } from 'react' | |
import { View } from 'react-native' | |
import styled, { css } from 'styled-components/native' | |
import { ThemeColorName } from '../../../types' | |
import { invariant, normalize, useOnPress } from '../../../util' | |
import { | |
Avatar, | |
Button, |
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 { useRef, useEffect } from 'react'; | |
function useTraceUpdate(props: any) { | |
const prev = useRef(props); | |
useEffect(() => { | |
const changedProps = Object.entries(props).reduce((ps, [k, v]) => { | |
if (prev.current[k] !== v) { | |
ps[k] = [prev.current[k], v]; | |
} | |
return ps; |
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 from "react"; | |
import { TouchableOpacity } from "react-native" | |
const DoubleTap = ({ children, delay, doubleTap, singleTap, ...rest }) => { | |
let timer = false; | |
let firstPress = true; | |
let delayTime = delay; | |
let lastTime = new Date(); | |
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
// grid system | |
.grid-base, | |
.grid-1, | |
.grid-2, | |
.grid-3, | |
.grid-4, | |
.grid-5, | |
.grid-6 { | |
display: -webkit-box; | |
display: -webkit-flex; |
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
let | |
gulp = require('gulp'), | |
concat = require('gulp-concat-css'), | |
minify = require('gulp-clean-css'), | |
prefix = require('gulp-autoprefixer'); | |
let path = { | |
src: './*.css', | |
dest: './done/' | |
} |
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
$base: 15; | |
@function em($pixels, $context: $base) { | |
@if (unitless($pixels)) { | |
$pixels: $pixels * 1px; | |
} | |
@if (unitless($context)) { | |
$context: $context * 1px; | |
} |