-
Notifications
You must be signed in to change notification settings - Fork 16
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
Migrate 'LegendWidgetUI' component from makeStyles to styled-component + cleanup #637
Migrate 'LegendWidgetUI' component from makeStyles to styled-component + cleanup #637
Conversation
…mponent + cleanup
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.
minWidth: '240px', | ||
backgroundColor: theme.palette.background.paper, | ||
boxShadow: theme.shadows[1], | ||
borderRadius: 4 |
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.
theme.spacing(0.5)
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.
done!
flexDirection: 'row', | ||
alignItems: 'center', | ||
justifyContent: 'space-between', | ||
height: '36px' |
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.
theme.spacing(4.5)
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.
done!
Pull Request Test Coverage Report for Build 4698253318
💛 - Coveralls |
CHANGELOG.md
Outdated
@@ -6,6 +6,8 @@ | |||
- Note component cleaned styles from makeStyles [#630](https://github.com/CartoDB/carto-react/pull/630) | |||
- OpacityControl component migrated from makeStyles to styled-components + cleanup [#631](https://github.com/CartoDB/carto-react/pull/631) | |||
|
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.
Empty line
borderRadius: 4 | ||
} | ||
const LegendBox = styled(Box)(({ theme }) => ({ | ||
minWidth: '240px', |
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.
theme.spacing(30) ?
@jantolg @aaranadev the text is still cut, can you take a look please? |
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.
Great, thank you so much!!
@@ -1,6 +1,5 @@ | |||
import React, { useState } from 'react'; | |||
import LegendWidgetUI from '../../../src/widgets/legend/LegendWidgetUI'; | |||
import CartoIcon from '../../assets/carto-symbol.svg'; |
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.
unused
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.
👍🏻
Description
This PR includes a refactorization of LegendWidgetUI component, all classes from makestyles are been converted to styled components
Shortcut: 297037
Type of change
Acceptance
The code resultant must returns same styles component visualization as the same before changes
Basic checklist