UNPKG

infamous

Version:

A CSS3D/WebGL UI library.

16 lines (13 loc) 565 B
import XYZStringValues from './XYZStringValues' import Class from 'lowclass' export default Class('XYZSizeModeValues').extends(XYZStringValues, ({ Super }) => ({ default: { x: 'literal', y: 'literal', z: 'literal' }, allowedValues: [ 'literal', 'proportional' ], checkValue(prop, value) { if (!Super(this).checkValue(prop, value)) return false if ( !this.allowedValues.includes( value ) ) throw new TypeError(`Expected ${prop} to be one of 'literal' or 'proportional'. Received: '${value}'`) return true }, }))