Stele - Select Ordinal
SelectOrdinal
Ordinal numbers are a type of number that denotes order.
For example First I ate dinner.
But if that number is dynamic and maybe relies on a noun,
then the cases get much more complicated. Fortunately, Stele makes it easy for us to do this.
Basic Usage
import * as React from 'react'import { SelectOrdinal } from '@patreon/stele'function MyComponent(props) {return (<Text intl>Rent is due on the<SelectOrdinalvalue={props.dayNum}one="#st"two="#nd"few="#rd"other="#th"/></Text>)}
Example message
{dayNum, selectordinal,one {#st}two {#nd}few {#rd}other {#th}}
Props
value
Number
required
zero
String | undefined
one
String | undefined
two
String | undefined
few
String | undefined
many
String | undefined
other
String | undefined
Playground
Rent is due on the 1st