Compare commits

...

4 Commits

Author SHA1 Message Date
Leonardo Yuri Farias
1394f02038 Merge pull request #1062 from datopian/changeset-release/main
Version Packages
2023-12-19 22:25:59 -03:00
github-actions[bot]
e687779fa6 Version Packages 2023-12-20 01:22:46 +00:00
Leonardo Yuri Farias
2ec143707d Merge pull request #1061 from datopian/feature/style-in-map-component
Created the style property for the map component
2023-12-19 22:20:07 -03:00
Leonardo Farias
4ddfc1126a Created the style property for the map component 2023-12-19 22:16:57 -03:00
4 changed files with 19 additions and 7 deletions

View File

@@ -1,5 +1,11 @@
# @portaljs/components # @portaljs/components
## 0.5.1
### Patch Changes
- [#1061](https://github.com/datopian/portaljs/pull/1061) [`4ddfc112`](https://github.com/datopian/portaljs/commit/4ddfc1126a3f0b8137ea47a08a36c56b7373b8f6) Thanks [@Gutts-n](https://github.com/Gutts-n)! - Created the style property in the Map component
## 0.5.0 ## 0.5.0
### Minor Changes ### Minor Changes

View File

@@ -1,6 +1,6 @@
{ {
"name": "@portaljs/components", "name": "@portaljs/components",
"version": "0.5.0", "version": "0.5.1",
"type": "module", "type": "module",
"description": "https://portaljs.org", "description": "https://portaljs.org",
"keywords": [ "keywords": [

View File

@@ -30,6 +30,7 @@ export type MapProps = {
title?: string; title?: string;
center?: { latitude: number | undefined; longitude: number | undefined }; center?: { latitude: number | undefined; longitude: number | undefined };
zoom?: number; zoom?: number;
style?: Object;
}; };
export function Map({ export function Map({
@@ -44,6 +45,7 @@ export function Map({
center = { latitude: 45, longitude: 45 }, center = { latitude: 45, longitude: 45 },
zoom = 2, zoom = 2,
title = '', title = '',
style = {}
}: MapProps) { }: MapProps) {
const [isLoading, setIsLoading] = useState<boolean>(false); const [isLoading, setIsLoading] = useState<boolean>(false);
const [layersData, setLayersData] = useState<any>([]); const [layersData, setLayersData] = useState<any>([]);
@@ -96,6 +98,7 @@ export function Map({
zoom={zoom} zoom={zoom}
scrollWheelZoom={false} scrollWheelZoom={false}
className="h-80 w-full" className="h-80 w-full"
style={style ?? {}}
// @ts-ignore // @ts-ignore
whenReady={(map: any) => { whenReady={(map: any) => {
// Enable zoom using scroll wheel // Enable zoom using scroll wheel

View File

@@ -21,6 +21,9 @@ const meta: Meta = {
zoom: { zoom: {
description: 'Zoom level', description: 'Zoom level',
}, },
style: {
description: "Styles for the container"
}
}, },
}; };