Skip to content

Commit

Permalink
Merge pull request #3400 from LiteFarmOrg/LF-4405/Floating_menu_butto…
Browse files Browse the repository at this point in the history
…n_looks_different_from_what_is_designed

LF-4405: floating menu button looks different from what is designed
  • Loading branch information
Duncan-Brain authored Sep 26, 2024
2 parents 4b22a75 + 02fe82c commit 974f7ac
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 18 deletions.
1 change: 1 addition & 0 deletions packages/webapp/src/assets/colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
--secondaryGreen800: #495c51;
--secondaryGreen200: #c1e6d2;
--secondaryGreen50: #f2faf5;
--yellow900: #6b4d00;
--yellow700: #ffb800;
--yellow400: #fed450;
--yellow300: #fce38d;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,21 @@
.floatingActionButton {
position: relative;

&[aria-expanded="true"] {
background-color: #E3B000;
}
@media (hover: hover) {
&:hover {
background-color: #E3B000;
background-color: var(--Btn-primary-hover);
}
}
&[aria-expanded='true'] {
background-color: var(--yellow700);
}

&.add {
&::before, &::after {
content: "";
&::before,
&::after {
content: '';
position: absolute;
background-color: #634D00;
background-color: var(--yellow900);
transition: 0.5s;
}

Expand All @@ -47,17 +48,22 @@
height: 4px;
}

&[aria-expanded="true"] {
&::before, &::after {
background-color: #fff;
}
}
@media (hover: hover) {
&:hover {
&::before, &::after {
&::before,
&::after {
background-color: #fff;
}
}
}

&[aria-expanded='true'] {
box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.25);

&::before,
&::after {
background-color: var(--yellow900);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,8 @@ export default function FloatingButtonMenu({
};

return (
<div className={clsx(styles.buttonWrapper, classes.button)}>
<div ref={anchorRef} className={clsx(styles.buttonWrapper, classes.button)}>
<FloatingActionButton
ref={anchorRef}
id="composition-button"
aria-controls={open ? 'composition-menu' : undefined}
aria-expanded={open ? 'true' : undefined}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,18 @@
box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
display: flex;
flex-direction: column;
gap: 1px;
gap: 8px;
margin-bottom: 4px;
}

.menuItem {
height: 48px;
padding: 8px 16px;
color: #996E00;
border-radius: 8px;
color: #996e00;
background-color: var(--yellow100);
font-size: 16px;
font-weight: 700;
font-weight: 400;
line-height: 24px;
text-align: center;

Expand Down

0 comments on commit 974f7ac

Please sign in to comment.