curls
Version:
💪 Responsive, expressive UI primitives for React written with Style Hooks and Emotion
18 lines (17 loc) • 551 B
JavaScript
import {oneOfType, bool, number, string, func} from 'prop-types'
export const boolNumOrString = oneOfType([bool, number, string])
export const implicitNum = oneOfType([number, string, bool])
export const positional = {
fromTop: boolNumOrString,
fromRight: boolNumOrString,
fromBottom: boolNumOrString,
fromLeft: boolNumOrString,
}
export const toggleVisibility = {
toggle: func,
isVisible: bool,
show: func,
hide: func,
}
export const boolOrString = oneOfType([bool, string])
export const boolOrNum = oneOfType([bool, number, string])