@bytebrand/fe-ui-core 4.1.44 → 4.1.45
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 +1 -1
- package/source/components/PriceRating/PriceRating.styl +1 -1
- package/source/components/VehicleSmallCard/VehicleData/VehiclePrice/VehiclePrice.styl +1 -2
- package/source/components/VehicleSmallCard/VehicleData/VehiclePrice/VehiclePrice.tsx +2 -2
- package/source/components/_common/TimePicker/TimePicker.tsx +12 -9
package/package.json
CHANGED
|
@@ -236,8 +236,8 @@ class VehiclePrice extends React.Component<IVehiclePriceSectionProps> {
|
|
|
236
236
|
{ListPrices}
|
|
237
237
|
{vehicleComponentName === 'favorite' && (
|
|
238
238
|
<div className={styles.wrapHandleCompare}>
|
|
239
|
-
<Button variant='
|
|
240
|
-
<IconSVG className={styles.removeIcon} name='
|
|
239
|
+
<Button variant='text' onClick={onRemoveClick} className={styles.btnCompareRemove} color='secondary'>
|
|
240
|
+
<IconSVG className={styles.removeIcon} name='trashIcon' customDimensions />
|
|
241
241
|
</Button>
|
|
242
242
|
<Button className={styles.btnCarToCompare} variant='outlined' onClick={toggleCarToCompare}>
|
|
243
243
|
<span className={styles.btnPlusIcon}>{!toCompare ? '+' : '-'}</span>
|
|
@@ -3,8 +3,6 @@ import MaterialSelect from '../MaterialSelect/MaterialSelect';
|
|
|
3
3
|
import styles from './TimePicker.styl';
|
|
4
4
|
|
|
5
5
|
interface ITimePickerProps {
|
|
6
|
-
onHandleTimeChange: (value: number) => void;
|
|
7
|
-
onHandleDayChange: (value: number) => void;
|
|
8
6
|
onHandleTimestampChange: (value: string) => void;
|
|
9
7
|
className: string;
|
|
10
8
|
lang: string;
|
|
@@ -15,18 +13,22 @@ interface ITimePickerProps {
|
|
|
15
13
|
}
|
|
16
14
|
|
|
17
15
|
const TimePicker = ({
|
|
18
|
-
onHandleTimeChange,
|
|
19
|
-
onHandleDayChange,
|
|
20
16
|
onHandleTimestampChange,
|
|
21
17
|
className,
|
|
22
18
|
lang,
|
|
23
|
-
time,
|
|
24
|
-
day,
|
|
25
19
|
t,
|
|
26
20
|
size = 'custom'
|
|
27
21
|
}: ITimePickerProps) => {
|
|
28
22
|
const date = new Date();
|
|
29
23
|
const [currentDay, setCurrentDay] = useState(date.getDay());
|
|
24
|
+
const [day, setDay] = useState(0);
|
|
25
|
+
const [time, setTime] = useState(0);
|
|
26
|
+
const onHandleDayChange = (value: number) => {
|
|
27
|
+
setDay(value);
|
|
28
|
+
};
|
|
29
|
+
const onHandleTimeChange = (value: number) => {
|
|
30
|
+
setTime(value)
|
|
31
|
+
}
|
|
30
32
|
const format = {
|
|
31
33
|
hour: 'numeric',
|
|
32
34
|
minute: 'numeric'
|
|
@@ -37,10 +39,11 @@ const TimePicker = ({
|
|
|
37
39
|
const setNewDay = new Date(`${date.toDateString()} ${endOfTheDayTime}`) > date ? 0 : 86400000;
|
|
38
40
|
const interval = 30 * 60 * 1000;
|
|
39
41
|
const roundedTime = new Date(Math.ceil(date / interval) * interval);
|
|
40
|
-
const nextWeekDays = [...Array(7).keys()].map(days => (
|
|
42
|
+
const nextWeekDays = [...Array(7).keys()].map((days, index) => (
|
|
41
43
|
{
|
|
42
|
-
value:
|
|
43
|
-
label: new Date(Date.now() + setNewDay + 86400000 * days).toLocaleString(lang, { weekday: 'short', day: 'numeric', month: '2-digit' })
|
|
44
|
+
value: index,
|
|
45
|
+
label: new Date(Date.now() + setNewDay + 86400000 * days).toLocaleString(lang, { weekday: 'short', day: 'numeric', month: '2-digit' }),
|
|
46
|
+
day: new Date(Date.now() + setNewDay + 86400000 * days).toLocaleString(lang, { weekday: 'short', day: 'numeric', month: '2-digit' })
|
|
44
47
|
}
|
|
45
48
|
));
|
|
46
49
|
const nextWeekDaysFull = [...Array(7).keys()].map(days => new Date(Date.now() + setNewDay + 86400000 * days));
|