fix: branded footer nits (#3209)

* chore: export brand color

* fix: target only children for extracted color transitions

* fix: branded footer nits
This commit is contained in:
Zach Pomerantz 2022-01-31 12:08:39 -08:00 committed by GitHub
parent ab8c1e3e90
commit c82b4fae64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 17 deletions

@ -1,7 +1,7 @@
import { Trans } from '@lingui/macro'
import Row from 'lib/components/Row'
import { Logo } from 'lib/icons'
import styled, { ThemedText } from 'lib/theme'
import styled, { brand, ThemedText } from 'lib/theme'
import ExternalLink from './ExternalLink'
@ -13,26 +13,28 @@ const UniswapA = styled(ExternalLink)`
${Logo} {
fill: ${({ theme }) => theme.secondary};
height: 1em;
transition: transform 0.25s ease;
transition: transform 0.25s ease, fill 0.25s ease;
width: 1em;
will-change: transform;
}
:hover {
fill: ${({ theme }) => theme.onHover(theme.secondary)};
transform: rotate(-5deg);
}
:hover ${Logo} {
fill: ${brand};
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>
<Row justify="center">
<UniswapA href={`https://app.uniswap.org/`}>
<Row gap={0.25}>
<Logo />
<ThemedText.Caption>
<Trans>Powered by the Uniswap protocol</Trans>
</ThemedText.Caption>
</Row>
</UniswapA>
</Row>
)
}

@ -21,12 +21,13 @@ const OutputColumn = styled(Column)<{ hasColor: boolean | null }>`
background-color: ${({ theme }) => theme.module};
border-radius: ${({ theme }) => theme.borderRadius - 0.25}em;
padding: 0.75em;
padding-bottom: 0.5em;
position: relative;
// Set transitions to reduce color flashes when switching color/token.
// When color loads, transition the background so that it transitions from the empty or last state, but not _to_ the empty state.
transition: ${({ hasColor }) => (hasColor ? 'background-color 0.25s ease-out' : undefined)};
* {
> {
// When color is loading, delay the color/stroke so that it seems to transition from the last state.
transition: ${({ hasColor }) => (hasColor === null ? 'color 0.25s ease-in, stroke 0.25s ease-in' : undefined)};
}

@ -39,7 +39,7 @@ const WidgetWrapper = styled.div<{ width?: number | string }>`
font-size: 16px;
font-smooth: always;
font-variant: none;
height: 376px;
height: 368px;
min-width: 300px;
overflow-y: hidden;
padding: 0.25em;

@ -14,9 +14,11 @@ export * from './layer'
export * from './styled'
export * as ThemedText from './type'
export const brand = '#FF007A'
export const lightTheme: Colors = {
// surface
accent: '#FF007A',
accent: brand,
container: '#F7F8FA',
module: '#E2E3E9',
interactive: '#CED0D9',