Skip to content

Commit

Permalink
lint and fix
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasBa committed Aug 9, 2024
1 parent 7d79087 commit ef20f80
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 26 deletions.
7 changes: 2 additions & 5 deletions static/app/components/alertLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import omit from 'lodash/omit';
import ExternalLink from 'sentry/components/links/externalLink';
import Link from 'sentry/components/links/link';
import {IconChevron} from 'sentry/icons';
import {space} from 'sentry/styles/space';

type Size = 'small' | 'normal';
type Priority = 'info' | 'warning' | 'success' | 'error' | 'muted';
Expand Down Expand Up @@ -91,10 +90,8 @@ const StyledLink = styled(
text-underline-offset: 0.06em;
border: 1px solid ${p => p.theme.alert[p.priority].border};
padding: ${p =>
p.size === 'small'
? `${p => p.theme.space(1)} ${p => p.theme.space(1.5)}`
: space(2)};
margin-bottom: ${p => (p.withoutMarginBottom ? 0 : space(3))};
p.size === 'small' ? `${p.theme.space(1)} ${p.theme.space(1.5)}` : p.theme.space(2)};
margin-bottom: ${p => (p.withoutMarginBottom ? 0 : p.theme.space(3))};
border-radius: 0.25em;
transition: 0.2s border-color;
Expand Down
2 changes: 1 addition & 1 deletion static/app/components/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ const StyledButton = styled(
`font-size: inherit; font-weight: inherit; padding: 0; height: auto; min-height: auto;`}
${p =>
p.size === 'zero' &&
`height: auto; min-height: auto; padding: ${p => p.theme.space(0.25)};`}
`height: auto; min-height: auto; padding: ${p.theme.space(0.25)};`}
&:focus {
outline: none;
Expand Down
2 changes: 1 addition & 1 deletion static/app/components/emptyMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const IconWrapper = styled('div')`

const Title = styled('strong')<{noMargin: boolean}>`
font-size: ${p => p.theme.fontSizeExtraLarge};
${p => !p.noMargin && `margin-bottom: ${p => p.theme.space(1)};`}
${p => !p.noMargin && `margin-bottom: ${p.theme.space(1)};`}
`;

const Description = styled(TextBlock)`
Expand Down
9 changes: 4 additions & 5 deletions static/app/components/layouts/thirds.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const Page = styled('main')<{withPadding?: boolean}>`
display: flex;
flex-direction: column;
flex: 1;
${p => p.withPadding && `padding: ${p => p.theme.space(3)} ${p => p.theme.space(4)}`};
${p => p.withPadding && `padding: ${p.theme.space(3)} ${p.theme.space(4)}`};
`;

/**
Expand Down Expand Up @@ -126,16 +126,15 @@ export const Body = styled('div')<{noRowGap?: boolean}>`
@media (min-width: ${p => p.theme.breakpoints.medium}) {
padding: ${p =>
!p.noRowGap
? `${p => p.theme.space(3)} ${p => p.theme.space(4)}`
: `${p => p.theme.space(2)} ${p => p.theme.space(4)}`};
? `${p.theme.space(3)} ${p.theme.space(4)}`
: `${p.theme.space(2)} ${p.theme.space(4)}`};
}
@media (min-width: ${p => p.theme.breakpoints.large}) {
display: grid;
grid-template-columns: minmax(100px, auto) 325px;
align-content: start;
gap: ${p =>
!p.noRowGap ? `${p => p.theme.space(3)}` : `0 ${p => p.theme.space(3)}`};
gap: ${p => (!p.noRowGap ? `${p.theme.space(3)}` : `0 ${p.theme.space(3)}`)};
}
`;

Expand Down
4 changes: 2 additions & 2 deletions static/app/components/menuItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -252,14 +252,14 @@ const MenuListItem = styled('li')<MenuListItemProps>`
p.divider &&
`
height: 1px;
margin: ${p => p.theme.space(0.5)} 0;
margin: ${p.theme.space(0.5)} 0;
overflow: hidden;
background-color: ${p.theme.innerBorder};
`}
${p =>
p.header &&
`
padding: ${p => p.theme.space(0.25)} ${p => p.theme.space(0.5)};
padding: ${p.theme.space(0.25)} ${p.theme.space(0.5)};
font-size: ${p.theme.fontSizeSmall};
line-height: 1.4;
color: ${p.theme.gray300};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ const SearchQueryGridWrapper = styled('div')<{size: 'small' | 'normal'}>`
padding: ${p =>
p.size === 'small'
? space(0.75)
: `${p => p.theme.space(0.75)} 34px ${p => p.theme.space(0.75)} 32px`};
: `${p.theme.space(0.75)} 34px ${p.theme.space(0.75)} 32px`};
display: flex;
align-items: stretch;
row-gap: ${p => p.theme.space(0.5)};
Expand Down
4 changes: 2 additions & 2 deletions static/app/components/sidebar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -854,8 +854,8 @@ const SidebarSection = styled(SidebarSectionGroup)<{
noMargin?: boolean;
noPadding?: boolean;
}>`
${p => !p.noMargin && `margin: ${p => p.theme.space(1)} 0`};
${p => !p.noPadding && `padding: 0 ${p => p.theme.space(2)}`};
${p => !p.noMargin && `margin: ${p.theme.space(1)} 0`};
${p => !p.noPadding && `padding: 0 ${p.theme.space(2)}`};
@media (max-width: ${p => p.theme.breakpoints.small}) {
margin: 0;
Expand Down
2 changes: 1 addition & 1 deletion static/app/components/sidebar/sidebarItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ const SidebarItemWrapper = styled('div')<{collapsed?: boolean}>`
justify-content: center;
width: 100%;
${p => !p.collapsed && `padding-right: ${p => p.theme.space(1)};`}
${p => !p.collapsed && `padding-right: ${p.theme.space(1)};`}
@media (max-width: ${p => p.theme.breakpoints.medium}) {
padding-right: 0;
}
Expand Down
2 changes: 1 addition & 1 deletion static/app/components/tabs/tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ const TabSelectionIndicator = styled('div')<{
${p =>
p.orientation === 'horizontal'
? `
width: calc(100% - ${p => p.theme.space(2)});
width: calc(100% - ${p.theme.space(2)});
height: 3px;
bottom: 0;
Expand Down
2 changes: 1 addition & 1 deletion static/app/components/tabs/tabList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ const TabListWrap = styled('ul', {shouldForwardProp: tabsShouldForwardProp})<{
grid-auto-flow: row;
align-content: start;
gap: 1px;
padding-right: ${p => p.theme.space(2)};
padding-right: ${p.theme.space(2)};
${!p.hideBorder && `border-right: solid 1px ${p.theme.border};`}
`};
`;
Expand Down
3 changes: 1 addition & 2 deletions static/app/views/dashboards/widgetCard/chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -601,8 +601,7 @@ const BigNumber = styled('div')`

const ChartWrapper = styled('div')<{autoHeightResize: boolean; noPadding?: boolean}>`
${p => p.autoHeightResize && 'height: 100%;'}
padding: ${p =>
p.noPadding ? `0` : `0 ${p => p.theme.space(3)} ${p => p.theme.space(3)}`};
padding: ${p => (p.noPadding ? `0` : `0 ${p.theme.space(3)} ${p.theme.space(3)}`)};
`;

const StyledSimpleTableChart = styled(SimpleTableChart)`
Expand Down
4 changes: 2 additions & 2 deletions static/app/views/replays/replayTable/tableCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -670,8 +670,8 @@ const Item = styled('div')<{
gap: ${p => p.theme.space(1)};
${p =>
p.isWidget
? `padding: ${p => p.theme.space(0.75)} ${p => p.theme.space(1.5)} ${p => p.theme.space(1.5)} ${p => p.theme.space(1.5)};`
: `padding: ${p => p.theme.space(1.5)};`};
? `padding: ${p.theme.space(0.75)} ${p.theme.space(1.5)} ${p.theme.space(1.5)} ${p.theme.space(1.5)};`
: `padding: ${p.theme.space(1.5)};`};
${p => (p.isArchived ? 'opacity: 0.5;' : '')};
${p => (p.isReplayCell ? 'overflow: auto;' : '')};
`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ const SourceGroup = styled('div')<{isExpanded: boolean}>`
border-radius: ${p.theme.borderRadius};
border: 1px solid ${p.theme.border};
box-shadow: ${p.theme.dropShadowMedium};
margin: ${p => p.theme.space(2)} 0 ${p => p.theme.space(3)} 0;
padding: ${p => p.theme.space(2)};
margin: ${p.theme.space(2)} 0 ${p.theme.space(3)} 0;
padding: ${p.theme.space(2)};
height: 180px;
`}
`;
Expand Down

0 comments on commit ef20f80

Please sign in to comment.