File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ simple example.
3333
3434### Properties
3535
36- * ` component :String|Function` - Element to render the timecode within. (Default: ` span ` )
36+ * ` as :String|Function` - Element to render the timecode within. (Default: ` span ` )
3737* ` format:String ` - Specifies the format to display the timecode. (Default: ` H:?m:ss ` )
3838 * ` HH:mm:ss.SSS ` - (Example: 00:01:23.876)
3939 * ` H:mm:ss.SSS ` - (Example: 0:01:23.876)
@@ -73,6 +73,17 @@ import Timecode from 'react-timecode';
7373
7474```
7575
76+ ### Utilities
77+
78+ In addition to the ` Timecode ` component, the underlying utility methods that the
79+ component uses for rendering the timecodes have also been exposed, in case you
80+ have some need to render some strings without the context of the component.
81+
82+ * ` parseTime(time:Number): { hours: Number, minutes: Number, seconds: Number, milliseconds: Number } `
83+ * ` pad(number: Number, length: Number = 2): String `
84+ * ` formatMilliseconds(milliseconds: Number, length: Number = 3) `
85+ * ` formatTimecode({ format: String, time: Number }): String `
86+
7687## Pairs well with...
7788
7889* [ react-timer-wrapper] ( https://github.com/ryanhefner/react-timer-wrapper )
You can’t perform that action at this time.
0 commit comments