Skip to content

Commit 1ec7c95

Browse files
author
ange.picard
committed
feat(MapButton): add css variables
1 parent 06cabb0 commit 1ec7c95

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

src/components/MapButton.tsx

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,32 @@ import React from 'react';
33
import styled from 'styled-components';
44

55
const MapButtonWrapper = styled.button`
6-
box-shadow: 0px 0px 0px 1px var(--clr-grey-25, #d9dfe5);
6+
--button-text-color: #4C5761;
7+
--button-border-color: var(--clr-grey-25, #d9dfe5);
8+
--button-background-color: var(--clr-white, white);
9+
--button-hovered-background-color: var(--clr-light-grey-25, #e5e8eb);
10+
--button-active-background-color: var(--clr-light-grey-50, #cbd1d6);
11+
12+
box-shadow: 0px 0px 0px 1px var(--button-border-color);
713
border: none;
814
display: flex;
915
align-items: center;
1016
justify-content: center;
1117
cursor: pointer;
12-
background-color: var(--clr-white, white);
13-
color: #4C5761;
18+
background-color: var(--button-background-color);
19+
color: var(--button-text-color);
1420
height: 40px;
1521
min-width: 40px;
1622
border-radius: 2px;
23+
1724
& > * {
1825
font-size: 24px;
1926
}
2027
&:hover {
21-
background-color: var(--clr-light-grey-25, #e5e8eb);
28+
background-color: var(--button-hovered-background-color);
2229
}
2330
&:active {
24-
background-color: var(--clr-light-grey-50, #cbd1d6);
31+
background-color: var(--button-active-background-color);
2532
}
2633
`;
2734

0 commit comments

Comments
 (0)