Skip to content

Commit

Permalink
fix: [Widget] change the "reload" button (#242)
Browse files Browse the repository at this point in the history
* fix reload button and styling

* jordan nit
  • Loading branch information
lynnshaoyu authored Oct 7, 2022
1 parent 2a74b9d commit 30818c9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/components/Error/ErrorDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ export default function ErrorDialog({ header, error, action, onClick }: ErrorDia
{error.message ? `: ${error.message}` : ''}
</ThemedText.Code>
</Expando>
<ActionButton onClick={onClick}>{action}</ActionButton>
<ActionButton color="interactive" onClick={onClick}>
{action}
</ActionButton>
</Column>
</Column>
)
Expand Down
17 changes: 15 additions & 2 deletions src/components/Expando.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Column, { ColumnProps } from 'components/Column'
import Row from 'components/Row'
import Rule from 'components/Rule'
import useScrollbar from 'hooks/useScrollbar'
import { Expando as ExpandoIcon } from 'icons'
import { Expando as ExpandoIcon, Info as InfoIcon } from 'icons'
import { PropsWithChildren, ReactNode, useState } from 'react'
import styled from 'styled-components/macro'

Expand All @@ -13,7 +13,17 @@ const HeaderColumn = styled(Column)`
`

const TitleRow = styled(Row)`
color: ${({ theme }) => theme.secondary};
cursor: pointer;
font-size: 14px;
font-weight: 500;
line-height: 20px;
`

const TitleHeader = styled.div`
align-items: center;
display: flex;
justify-content: center;
`

const ExpandoColumn = styled(Column)<{ height: number; open: boolean }>`
Expand Down Expand Up @@ -55,7 +65,10 @@ export default function Expando({ title, open, onExpand, height, children, ...re
<HeaderColumn gap={open ? 0.5 : 0.75} onClick={onExpand}>
<Rule />
<TitleRow>
{title}
<TitleHeader>
<InfoIcon style={{ marginRight: '5px' }} color="secondary" />
{title}
</TitleHeader>
<IconButton color="secondary" icon={ExpandoIcon} iconProps={{ open }} />
</TitleRow>
{open && <Rule />}
Expand Down

1 comment on commit 30818c9

@vercel
Copy link

@vercel vercel bot commented on 30818c9 Oct 7, 2022

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-seven-tau.vercel.app
widgets-uniswap.vercel.app
widgets-git-main-uniswap.vercel.app

Please sign in to comment.