UNPKG

@theoplayer/react-native-ui

Version:

A React Native UI for @theoplayer/react-native

32 lines (31 loc) 822 B
import React from 'react'; import { StaticTimeLabel } from './StaticTimeLabel'; import { useCurrentTime, useDuration } from '../../hooks/barrel'; import { jsx as _jsx } from "react/jsx-runtime"; /** * The default style for the time label. */ export const DEFAULT_TIME_LABEL_STYLE = { marginLeft: 10, marginRight: 10, height: 20, alignSelf: 'center' }; /** * The default time label component for the `react-native-theoplayer` UI. */ export const TimeLabel = props => { const currentTime = useCurrentTime(); const duration = useDuration(); const { showDuration, style } = props; return /*#__PURE__*/_jsx(StaticTimeLabel, { showDuration: showDuration, time: currentTime, duration: duration, style: [DEFAULT_TIME_LABEL_STYLE, style] }); }; //# sourceMappingURL=TimeLabel.js.map