Skip to content

Commit

Permalink
custom theming fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
SamueleA committed Nov 23, 2023
1 parent 11193f4 commit e04858c
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/react/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function App() {

const kitConfig: KitConfig = {
projectAccessKey: 'iK0DPkHRt0IFo8o4M3fZIIOAAAAAAAAAA',
defaultTheme: THEMES.dark,
defaultTheme: 'dark',
signIn: {
projectName: 'Skyweaver',
// logoUrl: 'sw-logo-white.svg',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const AccountInformation = forwardRef(({
<Text color="text100" fontWeight="medium" variant="normal">
{formatAddress(address || '')}
</Text>
<ChevronDownIcon />
<ChevronDownIcon color="text100" />
</Box>
</Box>
</Box>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,17 @@ export const WalletDropdownContent = forwardRef((
disconnect()
}

const getDropdownBackgroundColor = () => {
switch(theme) {
case 'dark':
return 'rgba(38, 38, 38, 0.85)'
case 'light':
return 'rgba(217, 217, 217, 0.85)'
default:
return vars.colors.transparent
}
}

return (
<Box
padding="3"
Expand All @@ -76,7 +87,7 @@ export const WalletDropdownContent = forwardRef((
backdropFilter: 'blur(12.5px)',
top: '16px',
left: '15px',
background: theme === 'dark' ? "rgba(38, 38, 38, 0.85)" : "rgba(217, 217, 217, 0.85)"
background: getDropdownBackgroundColor()
}}

>
Expand Down Expand Up @@ -109,6 +120,7 @@ export const WalletDropdownContent = forwardRef((
</Box>
<Box gap="2" marginTop="3" flexDirection="column">
<Button
variant="glass"
style={{ borderRadius: vars.radii.md }}
width="full"
leftIcon={QrCodeIcon}
Expand Down
1 change: 1 addition & 0 deletions packages/wallet/src/views/CoinDetails/Skeleton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export const CoinDetailsSkeleton = ({
</Box>
</Box>
<Button
color="text100"
marginTop="4"
marginBottom="10"
width="full"
Expand Down
1 change: 1 addition & 0 deletions packages/wallet/src/views/CoinDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ export const CoinDetails = ({
width="full"
variant="primary"
leftIcon={SendIcon}
color="text100"
label="Send"
onClick={onClickSend}
/>
Expand Down
1 change: 1 addition & 0 deletions packages/wallet/src/views/CollectibleDetails/Skeleton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export const CollectibleDetailsSkeleton = () => {
</Box>
</Box>
<Button
color="text100"
marginTop="4"
width="full"
variant="primary"
Expand Down
1 change: 1 addition & 0 deletions packages/wallet/src/views/CollectibleDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ export const CollectibleDetails = ({
</Box>
</Box>
<Button
color="text100"
marginTop="4"
width="full"
variant="primary"
Expand Down
1 change: 1 addition & 0 deletions packages/wallet/src/views/SendCoin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ export const SendCoin = ({
}

<Button
color="text100"
marginTop="3"
width="full"
variant="primary"
Expand Down
1 change: 1 addition & 0 deletions packages/wallet/src/views/SendCollectible.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ export const SendCollectible = ({
}

<Button
color="text100"
marginTop="3"
width="full"
variant="primary"
Expand Down
4 changes: 2 additions & 2 deletions packages/wallet/src/views/Settings/General.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const SettingsGeneral = () => {
return (
<Box style={{ paddingTop: HEADER_HEIGHT }}>
<Box gap="2" padding="5" paddingTop="3" flexDirection="column">
<Card
{/* <Card
flexDirection="row"
justifyContent="space-between"
alignItems="center"
Expand All @@ -41,7 +41,7 @@ export const SettingsGeneral = () => {
checked={theme === 'dark'}
onCheckedChange={onChangeTheme}
/>
</Card>
</Card> */}
<Card
flexDirection="row"
justifyContent="space-between"
Expand Down

0 comments on commit e04858c

Please sign in to comment.