You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- The values and options used/available within the "Control" column are for demonstration purpose only.
24
+
- Use the "Reset controls" button on the top right side of the table in order to restore the initial demo values and options. Alternatively, you could reload the page.
25
+
26
+
### Usage
27
+
28
+
<Sourcedarktype={"jsx"}code={`
29
+
import { WeekRenderer } from 'react-text-renderer-components';
30
+
31
+
const Example = () => {
32
+
return <WeekRenderer value={new Date()} />
33
+
}`
34
+
} />
35
+
36
+
Back to the [Github Repository](https://github.com/khatastroffik/react-text-renderer-components)
description: "The **value** from which the *date* part should be rendered.",
17
+
},
18
+
pure: {
19
+
control: "boolean",
20
+
description: "If **pure** is set/defined, then the component will render nothing but the 'pure' text representation of the value. Otherwise, the text representation is embeded within a *<span></span>* tag. (default: false/unset)",
21
+
},
22
+
minimumIntegerDigits: {
23
+
control: {type: "range",min: 1,max: 2,step: 1},
24
+
description: "this parameter defines the amount of displayed digits (1 or 2) for the week number when the value is < 10. (default: 2 digits).",
25
+
defaultValue: undefined
26
+
},
27
+
displayYear: {
28
+
control: "boolean",
29
+
description: "Should the year corresponding to the week number be displayed (e.g. '53/2026')? (default: false/unset)"
description: {component: "The **WeekRenderer** component displays the **ISO-week number** corresponding to the input *value* of type `Date`. The displayed string is either pure or *spanned* i.e. enclosed by a *<span></span>* tag. Optionally, the year corresponding to the calculated week number can be disaplyed as well (e.g. '53/2026')."},
0 commit comments