(state: DateState, submitted: boolean = false)
| 1580 | } |
| 1581 | |
| 1582 | const renderParts = (state: DateState, submitted: boolean = false) => { |
| 1583 | return Arr.reduce( |
| 1584 | state.dateParts, |
| 1585 | "", |
| 1586 | (doc, part, currentIndex) => { |
| 1587 | const partDoc = part.toString() |
| 1588 | if (currentIndex === state.cursor && !submitted) { |
| 1589 | const annotation = Ansi.combine(Ansi.underlined, Ansi.cyanBright) |
| 1590 | return doc + Ansi.annotate(partDoc, annotation) |
| 1591 | } |
| 1592 | return doc + partDoc |
| 1593 | } |
| 1594 | ) |
| 1595 | } |
| 1596 | |
| 1597 | const renderDateOutput = ( |
| 1598 | leadingSymbol: string, |