Skip to content

Commit

Permalink
fix: settings tooltips alignment/sizing (#524)
Browse files Browse the repository at this point in the history
* fix: settings gtooltips alignment/sizing

* fix: test update
  • Loading branch information
just-toby authored Mar 2, 2023
1 parent 2472354 commit 246dcf9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
20 changes: 11 additions & 9 deletions src/components/Swap/Settings/RouterPreferenceToggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,16 @@ export default function RouterPreferenceToggle() {
}

return (
<ThemedText.Subhead2 color="secondary">
<Row flex align="center">
<Label
name={<Trans>Auto Router API</Trans>}
tooltip={<Trans>Use the Uniswap Labs API to get faster quotes.</Trans>}
/>
<Toggle onToggle={onToggle} checked={routerPreference === RouterPreference.API} />
</Row>
</ThemedText.Subhead2>
<Row flex align="center">
<Label
name={
<ThemedText.Subhead2 color="primary">
<Trans>Auto Router API</Trans>
</ThemedText.Subhead2>
}
tooltip={<Trans>Use the Uniswap Labs API to get faster quotes.</Trans>}
/>
<Toggle onToggle={onToggle} checked={routerPreference === RouterPreference.API} />
</Row>
)
}
2 changes: 1 addition & 1 deletion src/components/Swap/Settings/components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export function Label({ name, tooltip }: LabelProps) {
<Row gap={0.5} justify="flex-start" flex align="center">
<ThemedText.Subhead2>{name}</ThemedText.Subhead2>
{tooltip && (
<Tooltip placement="top" contained icon={Info}>
<Tooltip placement="top" contained icon={Info} iconProps={{ style: { height: '100%' } }}>
<ThemedText.Caption>{tooltip}</ThemedText.Caption>
</Tooltip>
)}
Expand Down
4 changes: 4 additions & 0 deletions src/components/__snapshots__/Header.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ Object {
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
style="height: 100%;"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
Expand Down Expand Up @@ -242,6 +243,7 @@ Object {
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
style="height: 100%;"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
Expand Down Expand Up @@ -453,6 +455,7 @@ Object {
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
style="height: 100%;"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
Expand Down Expand Up @@ -596,6 +599,7 @@ Object {
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
style="height: 100%;"
viewBox="0 0 24 24"
width="24"
xmlns="http://www.w3.org/2000/svg"
Expand Down

1 comment on commit 246dcf9

@vercel
Copy link

@vercel vercel bot commented on 246dcf9 Mar 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

widgets – ./

widgets-uniswap.vercel.app
widgets-seven-tau.vercel.app
widgets-git-main-uniswap.vercel.app

Please sign in to comment.