@bytebrand/fe-ui-core 4.2.28 → 4.2.30

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bytebrand/fe-ui-core",
3
- "version": "4.2.28",
3
+ "version": "4.2.30",
4
4
  "description": "UI components for the auto.de project",
5
5
  "main": "index.ts",
6
6
  "module": "dist/common.js",
@@ -26,8 +26,7 @@ const PriceContent: React.FunctionComponent<IPriceContentProps> = ({
26
26
  onAdjustRateClick,
27
27
  OfferBlockComponent,
28
28
  priceTabActiveIndex,
29
- offerBlockProps,
30
- checkoutData
29
+ offerBlockProps
31
30
  }) => {
32
31
  const priceRatingProps = {
33
32
  t,
@@ -41,7 +40,6 @@ const PriceContent: React.FunctionComponent<IPriceContentProps> = ({
41
40
  t,
42
41
  car,
43
42
  detailsText,
44
- checkoutData,
45
43
  OfferRequestButtonWrapper,
46
44
  priceTabActiveIndex,
47
45
  isAdditionalOption: true,
@@ -2,9 +2,9 @@
2
2
 
3
3
  .topWrapper
4
4
  position: absolute
5
- left: 20px
6
- right: 20px
7
- top: 20px
5
+ left: 16px
6
+ right: 16px
7
+ top: 16px
8
8
  user-select: none
9
9
  z-index: 1
10
10
  font-size: 20px
@@ -14,7 +14,7 @@
14
14
  +media-phone-only()
15
15
  left: 15px
16
16
  right: 15px
17
- top: 12px
17
+ top: 6px
18
18
 
19
19
  +media-tablet-landscape-down()
20
20
  font-size: 16px
@@ -10,7 +10,7 @@
10
10
  .titleOwerflow
11
11
  +media-tablet-down()
12
12
  truncate()
13
- padding: 15px
13
+ padding: 15px 15px 0
14
14
  display: flex
15
15
  flex-direction: column
16
16
 
@@ -26,6 +26,7 @@
26
26
  display: inline-block;
27
27
  text-overflow: ellipsis;
28
28
  white-space: nowrap;
29
+ margin-top: 3px;
29
30
 
30
31
  .userButton
31
32
  cursor: pointer
@@ -16,7 +16,6 @@ const OfferRequestBtnWrapper: React.FunctionComponent<IOfferRequestButtonWrapper
16
16
  priceTabActiveIndex,
17
17
  isAdditionalOption,
18
18
  controlsClassContainer,
19
- checkoutData = {},
20
19
  onShowOfferDetails
21
20
  }) => {
22
21
  const btnEl = useRef(null);
@@ -34,10 +33,11 @@ const OfferRequestBtnWrapper: React.FunctionComponent<IOfferRequestButtonWrapper
34
33
  return (
35
34
  <>
36
35
  <div className={controlsContainerClassName}>
37
- <OfferRequestButtonWrapper carId={carId} dealerId={dealerId} checkoutData={checkoutData} >
36
+ <OfferRequestButtonWrapper carId={carId} dealerId={dealerId} >
38
37
  {(
39
38
  onClick: () => void,
40
39
  isOfferRequested: boolean,
40
+ hasCheckout: boolean,
41
41
  _: void,
42
42
  isLoading: boolean,
43
43
  isSale: boolean,
@@ -48,14 +48,14 @@ const OfferRequestBtnWrapper: React.FunctionComponent<IOfferRequestButtonWrapper
48
48
  const offerButtonClassName = classnames(
49
49
  styles.controlButton,
50
50
  styles.offerButtonGet,
51
- { [styles.offerButtonSuccess]: isOfferRequested || !!Object.keys(checkoutData).length },
51
+ { [styles.offerButtonSuccess]: isOfferRequested || hasCheckout },
52
52
  { [styles.isAlternativeButton]: isAlternative || isSale || isAlternativeType }
53
53
  );
54
54
 
55
55
  const getRequestButtonTitle = () => {
56
56
  if (isSale) return t('sidebar.requestOfferSale');
57
57
  else if (isAlternativeType) return t('sidebar.importRequest');
58
- else if (checkoutData && Object.keys(checkoutData).length) return t('vehicleProps:title.toCheckoutCar');
58
+ else if (hasCheckout) return t('vehicleProps:title.toCheckoutCar');
59
59
  else if (isOfferRequested) return t('CheckoutPage:onlineCheckoutModal.redirectBtn');
60
60
  else return t('sidebar.requestOffer');
61
61
  };
@@ -252,7 +252,6 @@ interface IOfferRequestButtonWrapper {
252
252
  export interface IOfferRequestButtonWrapperProps {
253
253
  t?: (key: string, options?: object) => string;
254
254
  car: ICar;
255
- checkoutData: object;
256
255
  priceTabActiveIndex?: number;
257
256
  detailsText?: string | null;
258
257
  isAdditionalOption?: boolean;