UNPKG

elliptical-datetime

Version:

Elliptical phrases to handle natural language dates and times

21 lines (17 loc) 682 B
/** @jsx createElement */ import { createElement } from 'elliptical'; export var Weekday = { defaultProps: { label: 'day of the week' }, describe: function describe(_ref) { var props = _ref.props; return createElement( 'placeholder', { label: props.label, arguments: props.phraseArguments || (props.phraseArguments ? [props.phraseArgument] : [props.label]) }, createElement('list', { items: [{ text: 'Sunday', value: 0 }, { text: 'Monday', value: 1 }, { text: 'Tuesday', value: 2 }, { text: 'Wednesday', value: 3 }, { text: 'Thursday', value: 4 }, { text: 'Friday', value: 5 }, { text: 'Saturday', value: 6 }] }) ); } };