@digitransit-component/digitransit-component-favourite-editing-modal
isModalOpen
Required. Whether the dialog is open.
Type: boolean
handleClose
Required. Close modal.
Type: function
updateFavourites
Required. Called with the reordered favourites when the dialog is closed.
Type: function
deleteFavourite
Required. Called with the favourite the user confirmed deleting.
Type: function
onEditSelected
Required. Function that takes selected favourite object as parameter.
Type: function
isLoading
Required. Whether a save is in progress; shows a spinner over the list.
Type: boolean
favourites
Required.
Properties
typestringaddressstringgtfsIdstringgidstringlatnumberlonnumbernamestringselectedIconIdstringfavouriteIdstringlayerstring
lang
Optional. Language, fi, en or sv. Defaults to fi.
Type: string
FavouriteEditingModal
A dialog for reordering, editing and deleting favourite places, built on the HSL design system's Modal. Colors, typography and the mobile/desktop layout are handled by the design system, so the dialog follows the active deployment's theme.
Parameters
-
$0Object$0.isModalOpen$0.handleClose$0.updateFavourites$0.deleteFavourite$0.onEditSelected$0.favourites$0.isLoading$0.lang(optional, default'fi')
Examples
<FavouriteEditingModal
isModalOpen={modalOpen}
handleClose={handleClose}
favourites={favourites}
updateFavourites={onUpdateFavourites}
deleteFavourite={onDeleteFavourite}
onEditSelected={onEditSelected}
isLoading={false}
lang="fi"
/>
---
This module is part of the Digitransit-ui project. It is maintained in the HSLdevcom/digitransit-ui repository, where you can create PRs and issues.
Installation
Install this module individually:
$ npm install @digitransit-component/digitransit-component-favourite-editing-modal