-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clickable transport + refactor stop modal
- Loading branch information
Showing
22 changed files
with
473 additions
and
261 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
client/components/Map/Stops/Sidebar/Header/MapStopsSidebarHeader.module.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.MapStopsSidebarHeader { | ||
display: flex; | ||
gap: 16px; | ||
border-top-left-radius: 16px; | ||
border-top-right-radius: 16px; | ||
padding-right: 80px; | ||
|
||
background-color: #fff; | ||
} | ||
|
||
.MapStopsSidebarHeaderWrapper { | ||
position: sticky; | ||
top: 0; | ||
} | ||
|
||
.MapStopsSidebarHeaderInfo { | ||
display: flex; | ||
gap: 10px; | ||
flex: 1; | ||
} |
40 changes: 40 additions & 0 deletions
40
client/components/Map/Stops/Sidebar/Header/MapStopsSidebarHeader.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import React from 'react'; | ||
|
||
import classNames from 'classnames/bind'; | ||
|
||
import { StopType } from 'transport-common/types/masstrans'; | ||
|
||
import { Typography } from 'components/UI/Typography/Typography'; | ||
import { IconFont } from 'components/UI/Typography/IconFont/IconFont'; | ||
import { IconFontCharsNames } from 'common/constants/iconFontChars'; | ||
import { Divider } from 'components/UI/Divider/Divider'; | ||
import t from 'utils/typograph'; | ||
|
||
import { MapStopsSidebarProps } from '../MapStopsSidebar'; | ||
import { MapStopsSidebarRow } from '../Row/MapStopsSidebarRow'; | ||
|
||
import styles from './MapStopsSidebarHeader.module.css'; | ||
|
||
const cn = classNames.bind(styles); | ||
|
||
export interface MapStopsSidebarHeaderProps extends Pick<MapStopsSidebarProps, 'name'> { | ||
types: Exclude<StopType, StopType.TrollBus>[]; | ||
} | ||
|
||
export function MapStopsSidebarHeader({ types, name }: MapStopsSidebarHeaderProps) { | ||
return ( | ||
<div className={cn(styles.MapStopsSidebarHeaderWrapper)}> | ||
<MapStopsSidebarRow mix={styles.MapStopsSidebarHeader}> | ||
<div className={cn(styles.MapStopsSidebarHeaderInfo)}> | ||
<Typography variant="h3"> | ||
{types.map((t) => ( | ||
<IconFont key={t} name={IconFontCharsNames[t]} /> | ||
))} | ||
</Typography> | ||
<Typography variant="h3">{t(name)}</Typography> | ||
</div> | ||
</MapStopsSidebarRow> | ||
<Divider /> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
77f7715
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deploy preview for transport ready!
✅ Preview
https://transport-6ontmud7y-ekbdev.vercel.app
https://ekbdev-transport-feat-clickable-transport.vercel.app
Built with commit 77f7715.
This pull request is being automatically deployed with vercel-action