-
Notifications
You must be signed in to change notification settings - Fork 54
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
Rewards/ViewReward: add status info #1640
Conversation
b7978a0
to
6043b4b
Compare
605a589
to
1e96939
Compare
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.
Looks pretty good! Thanks for the cleanup. I see a couple quick things that I'd prefer we improved before merging, but nothing big. Feel free to push back on these suggestions!
const Header = styled(Text.Block).attrs({ | ||
smallcaps: true, | ||
})` | ||
color: ${({ theme }) => theme.contentSecondary}; |
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.
Sort of a separate discussion, but I wonder if it makes more sense to use inline css=
props for components like this, which would let us easily stop passing in theme
and allow the component to define it itself:
import React from 'react'
import { GU, Text, theme } from '@aragon/ui'
export default function Header({ children }) {
const theme = useTheme()
return (
<Text.Block
smallcaps
css={`color: ${theme.contentSecondary}; margin-top: ${2 * GU}px; margin-bottom: ${GU}px`}
>
{children}
</Text.Block>
)
}
A trade-off is that stylelint doesn't currently inspect these inline css=
props correctly.
What do you think?
(Also, rewriting this made me think that we should probably use GU here.)
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 like your suggestion of making this a fully-fledged component. However, I had to use style
instead of css
.
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 find it very strange that wrapping it in styled()
works, but using inline css=
doesn't. I thought they did the same thing!!
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.
🤷♀️
1e96939
to
d0412c5
Compare
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.
💋
TO DO before merging
dev
Fixes #1629