-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WAITP-1223: Tupaia web map legend #4724
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking really good. I have a couple of questions about possible ways to do some things, but they are optional to carry out.
return ( | ||
<> | ||
<MobileMapLegend /> | ||
<DesktopMapLegend /> | ||
<MobileMapLegend Legend={LegendComponent} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very minor, but what do you think about having the LegendComponent
as children
of the different legend wrappers?
</Wrapper> | ||
); | ||
export const DesktopMapLegend = ({ Legend }) => { | ||
return <Wrapper>{Legend}</Wrapper>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if, since this is so simple now, if it can just be a wrapper styled component inside MapLegend
?
|
||
const SeriesDivider = styled.div` | ||
height: 0; | ||
border-bottom: 1px solid #ffffff22; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want this colour to come from the theme at all? I dunno if it will change ever, but if the theme is a light theme then the divider wouldn't show, for example.
* setup map legend * update legend props * mobile map legend * Update MobileMapLegend.tsx * refactor map legend * fix console warnings
* setup map legend * update legend props * mobile map legend * Update MobileMapLegend.tsx * refactor map legend * fix console warnings
* setup map legend * update legend props * mobile map legend * Update MobileMapLegend.tsx * refactor map legend * fix console warnings fix export styles (#4727)
Issue #: WAITP-1223: Tupaia web map legend
Changes:
Screenshots: