@@ -51,16 +51,26 @@ render(
51
51
52
52
** When the countdown is over (0 seconds left) then the ` children ` prop will be rendered.**
53
53
54
- Children will also be rendered if you give a wrong date format.
54
+ > Children will also be rendered if you give a wrong date format.
55
+
56
+ ## Custom render component
57
+
58
+ If you want, you can pass ` customComponent ` prop to the Coming component to render your own component instead of the default countdown page.
59
+
60
+ Passed component will receive countdown data as props:
61
+ ` days ` , ` hours ` , ` minutes ` , ` seconds ` .
62
+
63
+ You can use the countdown data to display inside your own component.
55
64
56
65
## Available Props
57
66
58
- | Name | Type | Description | Default value |
59
- | ------------ | ------- | ---------------------------------------------------------------------- | ----------------------- |
60
- | enabled | boolean | Prop that indicates whether the Coming component should be rendered. | true |
61
- | toDate | string | Date in the format ` YYYY-MM-DD ` to which the component will countdown. | Current date + 3 months |
62
- | toTime | string | Time in ` HH:MM ` format to which the component will countdown. | 00:00 |
63
- | daysLabel | string | Label text for days. | days |
64
- | hoursLabel | string | Label text for hours. | hours |
65
- | minutesLabel | string | Label text for minutes. | minutes |
66
- | secondsLabel | string | Label text for seconds. | seconds |
67
+ | Name | Type | Description | Default value |
68
+ | --------------- | --------- | ---------------------------------------------------------------------- | ----------------------- |
69
+ | enabled | boolean | Prop that indicates whether the Coming component should be rendered. | true |
70
+ | toDate | string | Date in the format ` YYYY-MM-DD ` to which the component will countdown. | Current date + 3 months |
71
+ | toTime | string | Time in ` HH:MM ` format to which the component will countdown. | 00:00 |
72
+ | daysLabel | string | Label text for days. | days |
73
+ | hoursLabel | string | Label text for hours. | hours |
74
+ | minutesLabel | string | Label text for minutes. | minutes |
75
+ | secondsLabel | string | Label text for seconds. | seconds |
76
+ | customComponent | ReactNode | Custom React node to render instead of default Coming countdown page | - |
0 commit comments