forked from Uniswap/interface
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(widgets): move uniswap protocol branding from header to bottom o…
…f output (Uniswap#3194) * move branding from header to bottom of output * remove old prop * BrandingFooter component * pr feedback
- Loading branch information
1 parent
043fb95
commit 4a8f1d9
Showing
6 changed files
with
62 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { Trans } from '@lingui/macro' | ||
import Row from 'lib/components/Row' | ||
import { Logo } from 'lib/icons' | ||
import styled, { ThemedText } from 'lib/theme' | ||
|
||
import ExternalLink from './ExternalLink' | ||
|
||
const UniswapA = styled(ExternalLink)` | ||
color: ${({ theme }) => theme.secondary}; | ||
cursor: pointer; | ||
text-decoration: none; | ||
${Logo} { | ||
fill: ${({ theme }) => theme.secondary}; | ||
height: 1em; | ||
transition: transform 0.25s ease; | ||
width: 1em; | ||
will-change: transform; | ||
:hover { | ||
fill: ${({ theme }) => theme.onHover(theme.secondary)}; | ||
transform: rotate(-5deg); | ||
} | ||
} | ||
` | ||
|
||
export default function BrandedFooter() { | ||
return ( | ||
<UniswapA href={`https://app.uniswap.org/`}> | ||
<Row gap={0.4} justify="center"> | ||
<Logo /> | ||
<ThemedText.Caption color="secondary"> | ||
<Trans>Powered by the Uniswap protocol</Trans> | ||
</ThemedText.Caption> | ||
</Row> | ||
</UniswapA> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { HTMLProps } from 'react' | ||
|
||
/** | ||
* Outbound link | ||
*/ | ||
export default function ExternalLink({ | ||
target = '_blank', | ||
href, | ||
rel = 'noopener noreferrer', | ||
...rest | ||
}: Omit<HTMLProps<HTMLAnchorElement>, 'as' | 'ref' | 'onClick'> & { href: string }) { | ||
return ( | ||
<a target={target} rel={rel} href={href} {...rest}> | ||
{rest.children} | ||
</a> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters