Skip to content

Commit

Permalink
Fixes brave/brave-browser#11441 - Fixes spacing between cards in NTP …
Browse files Browse the repository at this point in the history
…settings
  • Loading branch information
ryanml committed Oct 5, 2020
1 parent 10f841f commit 5de49b0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions components/brave_new_tab_ui/components/default/settings/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,11 +295,15 @@ export const SettingsWidget = styled<{}, 'div'>('div')`
margin-top: 20px;
`

export const StyledWidgetSettings = styled<{}, 'div'>('div')`
interface WidgetSettingsProps {
hasFeatured: boolean
}

export const StyledWidgetSettings = styled<WidgetSettingsProps, 'div'>('div')`
font-family: ${p => p.theme.fontFamily.heading};
${SettingsWidget}:nth-child(even) {
margin-right: 17px;
${SettingsWidget}:nth-child(${p => p.hasFeatured ? 'odd' : 'even'}) {
margin-left: 17px;
}
`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class MoreCardsSettings extends React.PureComponent<Props, {}> {
bitcoinDotComSupported
} = this.props
return (
<StyledWidgetSettings>
<StyledWidgetSettings hasFeatured={togetherSupported}>
{
togetherSupported
? <FeaturedSettingsWidget>
Expand Down

0 comments on commit 5de49b0

Please sign in to comment.