Skip to content

Commit

Permalink
fix: sign out color dark mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
morganney committed Dec 16, 2023
1 parent 8327a07 commit 5ba51ad
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions packages/ui/src/components/profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useCallback, useState } from 'react'
import { toast } from '@busmap/components/toast'
import { Button } from '@busmap/components/button'
import { SignOut } from '@busmap/components/icons/signOut'
import { PB80T } from '@busmap/components/colors'
import { PB80T, PB20T, PB90T } from '@busmap/components/colors'

import { logout } from '@core/api/authn.js'
import { useGlobals } from '@core/globals.js'
Expand All @@ -13,17 +13,23 @@ import { useTheme } from '@module/settings/contexts/theme.js'
import { Page } from './page.js'

import type { FC } from 'react'
import type { Mode } from '@module/settings/types.js'

const SignOutBtn = styled.button`
const SignOutBtn = styled.button<{ $mode: Mode }>`
cursor: pointer;
background: none;
font-weight: bold;
border: none;
margin: 0;
margin: 0 0 0 auto;
padding: 0;
display: flex;
align-items: center;
gap: 8px;
color: ${({ $mode }) => ($mode === 'light' ? PB20T : PB90T)};
span:last-child {
color: ${({ $mode }) => ($mode === 'light' ? PB20T : PB90T)};
}
`
const ProviderBlock = styled.div`
display: flex;
Expand Down Expand Up @@ -142,7 +148,7 @@ const Profile: FC = () => {
</ProviderBlock>
</div>
<div>
<SignOutBtn disabled={loading} onClick={onClickSignOut}>
<SignOutBtn $mode={mode} disabled={loading} onClick={onClickSignOut}>
<span>Sign out</span>
<SignOut size="small" />
</SignOutBtn>
Expand Down

0 comments on commit 5ba51ad

Please sign in to comment.