diff --git a/__tests__/__snapshots__/input-moment.js.snap b/__tests__/__snapshots__/input-moment.js.snap index 0f140b7..e94e68d 100644 --- a/__tests__/__snapshots__/input-moment.js.snap +++ b/__tests__/__snapshots__/input-moment.js.snap @@ -2,6 +2,7 @@ exports[`render 1`] = `
diff --git a/src/less/time.less b/src/less/time.less index a477326..45b386a 100644 --- a/src/less/time.less +++ b/src/less/time.less @@ -5,6 +5,7 @@ padding-top: 50px; .showtime { + position: relative; text-align: center; } @@ -42,4 +43,12 @@ border-radius: 3px; text-align: center; } + + .amPmText { + color: @color-blue; + font-size: 28px; + position: absolute; + right: 10px; + top: 26px; + } } diff --git a/src/time.js b/src/time.js index 5eaec67..56abc17 100644 --- a/src/time.js +++ b/src/time.js @@ -21,9 +21,14 @@ export default class extends Component { return (
- {m.format('HH')} + + {this.props.amPmFormat ? m.format("h") : m.format("HH")} + : - {m.format('mm')} + {m.format("mm")} + {this.props.amPmFormat && ( + {m.format("A")} + )}