@landtrustinc/design-system 1.2.42 → 1.2.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +12 -0
- package/dist/index.js +19 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2016,6 +2016,18 @@ type TimerProps = {
|
|
|
2016
2016
|
* Additional CSS class names
|
|
2017
2017
|
*/
|
|
2018
2018
|
className?: string;
|
|
2019
|
+
/**
|
|
2020
|
+
* Text to display before the time left
|
|
2021
|
+
*/
|
|
2022
|
+
fontSize?: TTextSize;
|
|
2023
|
+
/**
|
|
2024
|
+
* Font weight of the text
|
|
2025
|
+
*/
|
|
2026
|
+
fontWeight?: TFontWeight;
|
|
2027
|
+
/**
|
|
2028
|
+
* Color of the text
|
|
2029
|
+
*/
|
|
2030
|
+
showSeconds?: boolean;
|
|
2019
2031
|
};
|
|
2020
2032
|
declare const Timer: FC<TimerProps>;
|
|
2021
2033
|
|
package/dist/index.js
CHANGED
|
@@ -7901,7 +7901,10 @@ var Timer = ({
|
|
|
7901
7901
|
expirationTimestamp,
|
|
7902
7902
|
onTimeUpdate,
|
|
7903
7903
|
onExpire,
|
|
7904
|
-
className
|
|
7904
|
+
className,
|
|
7905
|
+
fontSize = "md",
|
|
7906
|
+
fontWeight = "bold",
|
|
7907
|
+
showSeconds = false
|
|
7905
7908
|
}) => {
|
|
7906
7909
|
const [timeLeft, setTimeLeft] = (0, import_react51.useState)(
|
|
7907
7910
|
() => calculateTimeLeft(expirationTimestamp)
|
|
@@ -7931,14 +7934,21 @@ var Timer = ({
|
|
|
7931
7934
|
if (!timeLeft) {
|
|
7932
7935
|
return null;
|
|
7933
7936
|
}
|
|
7934
|
-
return /* @__PURE__ */ (0, import_jsx_runtime243.
|
|
7935
|
-
|
|
7936
|
-
|
|
7937
|
-
|
|
7938
|
-
|
|
7939
|
-
|
|
7940
|
-
|
|
7941
|
-
|
|
7937
|
+
return /* @__PURE__ */ (0, import_jsx_runtime243.jsxs)(Box_default, { css: rootStyles2, className, children: [
|
|
7938
|
+
/* @__PURE__ */ (0, import_jsx_runtime243.jsxs)(Text_default, { as: "span", fontWeight, size: fontSize, children: [
|
|
7939
|
+
timeLeft.days,
|
|
7940
|
+
"d : ",
|
|
7941
|
+
timeLeft.hours,
|
|
7942
|
+
"h : ",
|
|
7943
|
+
timeLeft.minutes,
|
|
7944
|
+
"m"
|
|
7945
|
+
] }),
|
|
7946
|
+
showSeconds && /* @__PURE__ */ (0, import_jsx_runtime243.jsxs)(Text_default, { as: "span", fontWeight, size: fontSize, children: [
|
|
7947
|
+
"\xA0: ",
|
|
7948
|
+
timeLeft.seconds,
|
|
7949
|
+
"s"
|
|
7950
|
+
] })
|
|
7951
|
+
] });
|
|
7942
7952
|
};
|
|
7943
7953
|
Timer.displayName = "Timer";
|
|
7944
7954
|
var Timer_default = Timer;
|