-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
flex: cleanup Flex* custom styling in favor of Flex primitive #93809
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
Changes from 1 commit
f647847
2345d0a
fadc8c7
3788afb
a820348
7f64ee0
11b9bf5
5d00d6c
fbf581b
5707e3e
54c5f8d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| import {Fragment} from 'react'; | ||
| import styled from '@emotion/styled'; | ||
|
|
||
| import {Flex} from 'sentry/components/core/layout'; | ||
| import TimeSince from 'sentry/components/timeSince'; | ||
| import {IconClock} from 'sentry/icons'; | ||
| import {t} from 'sentry/locale'; | ||
|
|
@@ -19,7 +20,7 @@ type Props = { | |
| function Times({lastSeen, firstSeen}: Props) { | ||
| return ( | ||
| <Container> | ||
| <FlexWrapper> | ||
| <FlexWrapper align="center"> | ||
| {lastSeen && ( | ||
| <Fragment> | ||
| <StyledIconClock legacySize="11px" /> | ||
|
|
@@ -42,12 +43,8 @@ const Container = styled('div')` | |
| min-width: 0; /* flex-hack for overflow-ellipsised children */ | ||
| `; | ||
|
|
||
| const FlexWrapper = styled('div')` | ||
| const FlexWrapper = styled(Flex)` | ||
|
||
| ${p => p.theme.overflowEllipsis} | ||
|
|
||
| /* The following aligns the icon with the text, fixes bug in Firefox */ | ||
| display: flex; | ||
| align-items: center; | ||
| `; | ||
|
|
||
| const StyledIconClock = styled(IconClock)` | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -52,9 +52,6 @@ export const BarContainer = styled('div')` | |
| `; | ||
|
|
||
| export const FlexContainer = styled('div')` | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: flex-end; | ||
| width: 100%; | ||
| `; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing a replacement here?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah no, I actually want to revert this one, and possibly just rename the component given that it's exported |
||
|
|
||
|
|
||
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.
Wonder if we should have
<Flex.Spacer />as a shorthand here? Seems easier to remember than this.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.
Yeah, that could also work. I don't have a strong opinion on it tbh, it seems like an edge case we can iron out later