Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🕹️ Update buttons #35

Merged
merged 3 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/frontend/src/components/bids/allBids/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const Header = () => {

return (
<StyledHeader>
<BackButton url="/" withBack />
<BackButton url="/" />
<Wrapper>
<Title>
<h2>Number of participants:</h2>
Expand Down
10 changes: 4 additions & 6 deletions packages/frontend/src/components/buttons/BackButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ interface BackButtonProps {
setView?: (view: number) => void
url?: string
resetState?: () => void
withBack?: boolean
}

export function BackButton({ view, setView, url, resetState, withBack = false }: BackButtonProps) {
export function BackButton({ view, setView, url, resetState }: BackButtonProps) {
const router = useRouter()

const goBack = useCallback(() => {
Expand All @@ -28,17 +27,16 @@ export function BackButton({ view, setView, url, resetState, withBack = false }:
}, [setView, view, router, url, resetState])

return (
<BackBtn onClick={goBack} $withBack={withBack}>
<BackBtn onClick={goBack}>
<ArrowLeftIcon color={Colors.Black} />
{withBack && 'Back'}
</BackBtn>
)
}

const BackBtn = styled.button<{ $withBack?: boolean }>`
const BackBtn = styled.button`
display: flex;
align-items: center;
width: ${({ $withBack }) => ($withBack ? '84px' : '35px')};
width: 35px;
height: 32px;
font-family: 'Roboto', Helvetica, Arial, sans-serif;
font-weight: 400;
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/components/icons/CloseIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { IconProps } from '@/components/icons/IconBase'

export const CloseIcon = ({ color, size, className }: IconProps) => {
return (
<svg width={size} height={size} viewBox={`0 0 ${size} ${size}`} fill="none" color={color} className={className}>
<svg width={size} height={size} viewBox="0 0 16 16" fill="none" color={color} className={className}>
<path d="M1 1L14 14" stroke="currentColor" />
<path d="M1 14L14 0.999999" stroke="currentColor" />
</svg>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,7 @@ export const AccountDetailModal = ({ isShown, onRequestClose }: ModalProps) => {
</>
)}
</ContentWrapper>
<Button view="secondary" onClick={onDisconnect}>
Disconnect
</Button>
<Button onClick={onDisconnect}>Disconnect</Button>
</Modal>
)
}
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/components/topBar/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const Modal = ({ isShown, onRequestClose, title, children }: ModalProps)
<Content>
<Header>
<Title>{title}</Title>
<CloseButton size={24} color={Colors.Black} onClick={closeModal} />
<CloseButton size={16} color={Colors.Black} onClick={closeModal} />
</Header>
{children}
</Content>
Expand Down