UNPKG

1.79 kBSource Map (JSON)View Raw
1{"version":3,"file":"Countdown.js","sources":["../src/components/Countdown/Countdown.js"],"sourcesContent":["import React from 'react'\nimport PropTypes from 'prop-types'\nimport Timer from '../Timer/Timer'\nimport { warnOnce } from '../../utils'\n\nclass Countdown extends React.Component {\n deprecationWarning() {\n warnOnce(\n 'Countdown',\n '\"Countdown\" has been deprecated. Please use \"Timer\" instead.'\n )\n }\n\n render() {\n this.deprecationWarning()\n const { end, removeDaysAndHours } = this.props\n const format = removeDaysAndHours ? 'ms' : 'dhms'\n return <Timer end={end} format={format} />\n }\n}\n\nCountdown.propTypes = {\n end: PropTypes.instanceOf(Date).isRequired,\n removeDaysAndHours: PropTypes.bool,\n}\n\nCountdown.defaultProps = {\n removeDaysAndHours: false,\n}\n\nexport default Countdown\n"],"names":["Countdown","warnOnce","deprecationWarning","props","end","removeDaysAndHours","format","React","Timer","Component","propTypes","PropTypes","instanceOf","Date","isRequired","bool","defaultProps"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKMA;;;;;;;;;;;;;yCACiB;AACnBC,MAAAA,oBAAQ,CACN,WADM,EAEN,8DAFM,CAAR;AAID;;;6BAEQ;AACP,WAAKC,kBAAL;AADO,wBAE6B,KAAKC,KAFlC;AAAA,UAECC,GAFD,eAECA,GAFD;AAAA,UAEMC,kBAFN,eAEMA,kBAFN;AAGP,UAAMC,MAAM,GAAGD,kBAAkB,GAAG,IAAH,GAAU,MAA3C;AACA,0BAAOE,6BAACC,aAAD;AAAO,QAAA,GAAG,EAAEJ,GAAZ;AAAiB,QAAA,MAAM,EAAEE;AAAzB,QAAP;AACD;;;;EAbqBC,cAAK,CAACE;;AAgB9BT,SAAS,CAACU,SAAV,GAAsB;AACpBN,EAAAA,GAAG,EAAEO,eAAS,CAACC,UAAV,CAAqBC,IAArB,EAA2BC,UADZ;AAEpBT,EAAAA,kBAAkB,EAAEM,eAAS,CAACI;AAFV,CAAtB;AAKAf,SAAS,CAACgB,YAAV,GAAyB;AACvBX,EAAAA,kBAAkB,EAAE;AADG,CAAzB;;;;"}
\No newline at end of file