Skip to content

Commit

Permalink
Add format prop to timedisplay (#9)
Browse files Browse the repository at this point in the history
Co-authored-by: Zephyr <[email protected]>
  • Loading branch information
ZeWaka and ZephyrTFA authored Aug 2, 2024
1 parent 6d7912b commit da3c0ff
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/components/TimeDisplay.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ export class TimeDisplay extends Component {
return this.state.value || null;
}

return formatTime(val);
if (this.props.format) {
return this.props.format(val);
} else {
return formatTime(val);
}
}
}

0 comments on commit da3c0ff

Please sign in to comment.