From 387da60ce074169efa25268d073e1c4627068bde Mon Sep 17 00:00:00 2001 From: Piero Nicolli Date: Tue, 30 Apr 2024 13:15:37 +0200 Subject: [PATCH] feat: configure osmmap to be used as view widget for geolocation in default view --- src/components/OSMMap/OSMMap.css | 4 ++++ src/index.js | 13 ++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/components/OSMMap/OSMMap.css b/src/components/OSMMap/OSMMap.css index c65c703..21ab18f 100644 --- a/src/components/OSMMap/OSMMap.css +++ b/src/components/OSMMap/OSMMap.css @@ -30,6 +30,10 @@ height: 300px; } +.view-defaultview .ui.basic.segment:has(#geocoded-result) { + width: 100%; +} + .marker-cluster { background-color: #ff8d00; border-radius: 100%; diff --git a/src/index.js b/src/index.js index d8a3a8f..8e765d9 100644 --- a/src/index.js +++ b/src/index.js @@ -1,13 +1,16 @@ import { GeoLocationWidget } from 'volto-venue/components'; +import { OSMMap } from 'volto-venue/components'; +export { GeoLocationWidget, OSMMap }; -export { OSMMap } from 'volto-venue/components'; -export { GeoLocationWidget }; - -export default (config) => { +export default function applyConfig(config) { config.widgets.id = { ...config.widgets.id, geolocation: GeoLocationWidget, }; + config.widgets.views.id.geolocation = ({ value }) => ( + + ); + return config; -}; +}