# All files / components/TimeScrubber/components TimeScrubberTimeDisplay.js

0% Statements 0/15
0% Branches 0/6
0% Functions 0/2
0% Lines 0/7

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23

     import React from 'react';
    import styled from 'styled-components';
    import Label from 'components/Label';
    import themeGet from 'extensions/themeGet';

    const Display = styled(Label)`
      position: absolute;
      top: ${themeGet('spacing.small')};
      left: 0;
      right: 0;
      text-align: center;
      pointer-events: none;
    `;

    /**
     * Displays the provided time within a TimeScrubber viewport
     */
    const TimeDisplay = ({ time }) => (
      <Display>{time && time.format('h:mm A')}</Display>
    );

    export default TimeDisplay;