Skip to content

Commit

Permalink
add green road background for oryarok
Browse files Browse the repository at this point in the history
  • Loading branch information
atalyaalon committed Oct 16, 2024
1 parent 7d58dde commit 3d0d7df
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
Binary file added src/assets/card-bg-road-oryarok.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 9 additions & 1 deletion src/components/molecules/card/AnyWayCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,15 @@ const AnyWayCard: FC<IProps> = ({
<Card ref={refFn} className={classes.root} variant="outlined">
<Box height={sizes.height} width={sizes.width} position="relative" padding={3}>
{/* HEADER */}
{organizationData?.key !== 'n12'?<CardBackgroundImage variant={variant.header} />:<></>}
{organizationData?.key !== 'n12' ? (
organizationData?.key == 'or' ? (
<CardBackgroundImage variant={variant.LogoOrYarok} />
) : (
<CardBackgroundImage variant={variant.header} />
)
) : (
<></>
)}
{variant.header !== HeaderVariant.None && (
<Box height={sizes.headerHeight} width="100%">
<CardHeader
Expand Down
5 changes: 5 additions & 0 deletions src/components/molecules/card/CardBackgroundImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { makeStyles, Theme } from '@material-ui/core';
import React, { FC } from 'react';
import { HeaderVariant } from 'services/widgets.style.service';
import CardBackgrounRoadImage from 'assets/card-bg-road.png';
import CardBackgrounRoadImageOrYarok from 'assets/card-bg-road-oryarok.png';
import CardBackgrounMapImage from 'assets/card-bg-map.png';

const ROAD_IMAGE_HEIGHT = 130;
Expand Down Expand Up @@ -33,6 +34,10 @@ const CardBackgroundImage: FC<IProps> = ({ variant }) => {
src = CardBackgrounRoadImage;
height = ROAD_IMAGE_HEIGHT;
break;
case HeaderVariant.LogoOrYarok:
src = CardBackgrounRoadImageOrYarok;
height = ROAD_IMAGE_HEIGHT;
break;
case HeaderVariant.Label:
src = CardBackgrounMapImage;
height = MAP_IMAGE_HEIGHT;
Expand Down
1 change: 1 addition & 0 deletions src/services/widgets.style.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export enum HeaderVariant {
CenteredNoTitle,
Label,
Logo,
LogoOrYarok
}

export enum FooterVariant {
Expand Down

0 comments on commit 3d0d7df

Please sign in to comment.