@bytebrand/fe-ui-core 4.1.117 → 4.1.119
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/VehicleSmallCard/VehicleData/VehiclePrice/VehiclePrice.tsx +2 -1
- package/source/components/_common/MaterialSelect/MaterialSelect.styled.tsx +0 -7
- package/source/components/_common/MaterialSelect/MaterialSelect.tsx +13 -8
- package/source/components/_common/TimePicker/TimePicker.tsx +2 -0
package/package.json
CHANGED
|
@@ -78,9 +78,10 @@ class VehiclePrice extends React.Component<IVehiclePriceSectionProps> {
|
|
|
78
78
|
};
|
|
79
79
|
|
|
80
80
|
onDetailsClick = (event: React.MouseEvent<HTMLButtonElement>) => {
|
|
81
|
+
const { id, url, onDetailsClick } = this.props;
|
|
81
82
|
event.preventDefault();
|
|
82
83
|
event.stopPropagation();
|
|
83
|
-
|
|
84
|
+
onDetailsClick(url, id);
|
|
84
85
|
};
|
|
85
86
|
|
|
86
87
|
render(): React.ReactNode {
|
|
@@ -34,6 +34,7 @@ export interface IVehicleModalProps {
|
|
|
34
34
|
onChange: (value: any) => void;
|
|
35
35
|
items: IItems[];
|
|
36
36
|
selectClassName?: string;
|
|
37
|
+
amountOfItems?: number;
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
const ITEM_HEIGHT = isMobileOnly ? 56 : 48;
|
|
@@ -59,7 +60,8 @@ const MaterialSelect: React.FC<IVehicleModalProps> = ({
|
|
|
59
60
|
selectClassName,
|
|
60
61
|
required,
|
|
61
62
|
items,
|
|
62
|
-
icon
|
|
63
|
+
icon,
|
|
64
|
+
amountOfItems = MENU_ITEMS
|
|
63
65
|
}: IVehicleModalProps) => {
|
|
64
66
|
const [newValue, setValue] = useState('');
|
|
65
67
|
const [multipleValue, setMultipleValue] = React.useState([]);
|
|
@@ -116,11 +118,14 @@ const MaterialSelect: React.FC<IVehicleModalProps> = ({
|
|
|
116
118
|
key={`${value}_${index}`}
|
|
117
119
|
value={value}
|
|
118
120
|
disabled={setDisabled}
|
|
119
|
-
sx={setDisabled ? {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
} : null}
|
|
121
|
+
// sx={setDisabled ? {
|
|
122
|
+
// backgroundColor: '#e8e8e8',
|
|
123
|
+
// color: '#333',
|
|
124
|
+
// opacity: '1 !important'
|
|
125
|
+
// } : null}
|
|
126
|
+
sx={{
|
|
127
|
+
height: ITEM_HEIGHT
|
|
128
|
+
}}
|
|
124
129
|
>
|
|
125
130
|
{!!t ? t(`${namespace}${cbd ? ':' : '.'}${label}`) : getLabel(label, setDisabled)}
|
|
126
131
|
</MenuItem>
|
|
@@ -179,8 +184,8 @@ const MaterialSelect: React.FC<IVehicleModalProps> = ({
|
|
|
179
184
|
PaperProps: {
|
|
180
185
|
sx: {
|
|
181
186
|
maxHeight: {
|
|
182
|
-
xs: MOBILE_ITEM_HEIGHT *
|
|
183
|
-
sm: ITEM_HEIGHT *
|
|
187
|
+
xs: MOBILE_ITEM_HEIGHT * amountOfItems + ITEM_PADDING_TOP,
|
|
188
|
+
sm: ITEM_HEIGHT * amountOfItems + ITEM_PADDING_TOP
|
|
184
189
|
}
|
|
185
190
|
}
|
|
186
191
|
},
|
|
@@ -123,6 +123,7 @@ const TimePicker = ({
|
|
|
123
123
|
className={styles.dayForm}
|
|
124
124
|
classNameIcon={styles.selectIcon}
|
|
125
125
|
items={nextWeekDays}
|
|
126
|
+
amountOfItems={6}
|
|
126
127
|
/>
|
|
127
128
|
<MaterialSelect
|
|
128
129
|
onChange={(value: any) => timeChange(value)}
|
|
@@ -134,6 +135,7 @@ const TimePicker = ({
|
|
|
134
135
|
selectClassName={styles.select}
|
|
135
136
|
classNameIcon={styles.selectIcon}
|
|
136
137
|
items={getTimeRanges()}
|
|
138
|
+
amountOfItems={6}
|
|
137
139
|
/>
|
|
138
140
|
</div>
|
|
139
141
|
);
|