@bytebrand/fe-ui-core 4.2.145 → 4.2.146
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/package.json
CHANGED
|
@@ -49,7 +49,7 @@ const Button: React.FC<IButtonProps> = ({ className, color, onClick, onMouseEnte
|
|
|
49
49
|
const props = {
|
|
50
50
|
variant,
|
|
51
51
|
className,
|
|
52
|
-
color,
|
|
52
|
+
color: !!color ? color : 'primary',
|
|
53
53
|
onClick: onHandlerClick,
|
|
54
54
|
onMouseEnter: onHandlerMouseEnter,
|
|
55
55
|
onMouseLeave: onHandlerMouseLeave,
|
|
@@ -582,30 +582,3 @@ export const getCents = (value: number, prefix?: string, postfix?: string): stri
|
|
|
582
582
|
export const priceParse = (value: any) => {
|
|
583
583
|
return !!value ? Number.parseFloat(value) : null;
|
|
584
584
|
};
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
/**
|
|
588
|
-
* Generates a timestamp (Unix time) after 14 days from the current date.
|
|
589
|
-
* @returns {number} Timestamp (Unix time) after 14 days.
|
|
590
|
-
*/
|
|
591
|
-
export const getUnixTimestampAfterTwoWeeks = () => {
|
|
592
|
-
const currentDate = new Date();
|
|
593
|
-
const futureDate = new Date();
|
|
594
|
-
|
|
595
|
-
futureDate.setDate(currentDate.getDate() + 14);
|
|
596
|
-
|
|
597
|
-
const unixTimestamp = Math.floor(futureDate.getTime() / 1000);
|
|
598
|
-
return unixTimestamp;
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
/**
|
|
602
|
-
* Converts a Unix timestamp to the day of the month.
|
|
603
|
-
* @param {number} unixTimestamp - The Unix timestamp to convert.
|
|
604
|
-
* @returns {number} The day of the month.
|
|
605
|
-
*/
|
|
606
|
-
export const convertUnixTimestampToDays = (unixTimestamp: number) => {
|
|
607
|
-
const milliseconds = unixTimestamp * 1000;
|
|
608
|
-
const date = new Date(milliseconds);
|
|
609
|
-
const day = date.getDate();
|
|
610
|
-
return day;
|
|
611
|
-
};
|