import _ from "lodash"; import React from "react"; export const getRenderer = settings => { const { showDays, showHours, showMinutes, showSeconds, showDivider, showLabels, properties } = settings; const dimensionStyle = { ...properties, marginTop: 0, display: "inline-block" }; const dimensionLabelStyle = { textAlign: "center", textTransform: "uppercase", fontFamily: _.get(properties, "fontFamily", "inherit"), color: _.get(properties, "color", "inherit"), fontSize: "13pt" }; const dividerStyle = { border: "none", background: "transparent" }; return ({ days, hours, minutes, seconds, completed }) => { if (completed) { return

Your time has expired

; } else { return (
{showDays && ( <>
{days} {showLabels &&

Days

}
{showDivider && (
: {showLabels && (

 

)}
)} )} {showHours && ( <>
{hours} {showLabels &&

Hours

}
{showDivider && (
: {showLabels && (

 

)}
)} )} {showMinutes && ( <>
{minutes} {showLabels && (

Minutes

)}
{showDivider && (
: {showLabels && (

 

)}
)} )} {showSeconds && (
{seconds} {showLabels &&

Seconds

}
)}
); } }; };