Skip to content

Commit 308ebb0

Browse files
committed
Increase menu item spacing for better readability.
1 parent cd57a10 commit 308ebb0

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mapbox-gl-contextmenu",
3-
"version": "1.0.6",
3+
"version": "1.0.7",
44
"description": "A contextmenu plugin for Mapbox GL JS",
55
"type": "module",
66
"main": "./dist/index.cjs",

src/components/ContextMenu/ContextMenu.module.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
background: var(--context-menu-bg);
1616
border-radius: var(--context-menu-border-radius, 4px);
1717
box-shadow: var(--context-menu-shadow);
18-
min-width: var(--context-menu-min-width, 150px);
18+
min-width: var(--context-menu-min-width, 200px);
1919
opacity: 0;
2020
pointer-events: none;
2121
visibility: hidden;
@@ -25,6 +25,7 @@
2525

2626
--context-menu-bg: white;
2727
--context-menu-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
28+
--context-menu-item-font-size: 13px;
2829
--context-menu-item-text-color: black;
2930
--context-menu-item-hover-bg: #e8e8e8;
3031
--context-menu-item-active-bg: #f3f3f3;

src/components/ContextMenuItem/ContextMenuItem.module.scss

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
.button {
1616
display: flex;
1717
align-items: center;
18-
gap: 8px;
18+
gap: 12px;
1919
width: 100%;
20-
height: 26px;
21-
padding: 0px 6px 0px 10px;
20+
height: 28px;
21+
padding: 0px 8px 0px 12px;
2222
margin: 0;
2323
border: none;
2424
border-radius: 3px;
@@ -29,6 +29,8 @@
2929
transition: background-color 150ms ease-out;
3030
outline: none;
3131
user-select: none;
32+
font-family: inherit;
33+
font-size: var(--context-menu-item-font-size);
3234

3335
&.focused:not(:disabled):not(.focusedParent) {
3436
background-color: var(--context-menu-item-hover-bg);

0 commit comments

Comments
 (0)