Skip to content

Commit

Permalink
fix: Fix scrollbar color issue
Browse files Browse the repository at this point in the history
  • Loading branch information
wenty22 committed Oct 16, 2024
1 parent 4a64ffe commit 8c8c1f2
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/polite-onions-double.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@node-real/walletkit': patch
---

Fix scrollbar color issue
10 changes: 9 additions & 1 deletion packages/walletkit/src/core/base/components/Modal/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { useTheme } from '@/core/providers/ThemeProvider/context';
import { useKeyDown } from '../../hooks/useKeyDown';
import { useResponsive } from '../../hooks/useResponsive';
import { useScrollLock } from '../../hooks/useScrollLock';
Expand Down Expand Up @@ -40,11 +41,18 @@ export function Modal(props: ModalProps) {
useScrollLock(isOpen);

const { isMobileLayout } = useResponsive();
const { colorMode } = useTheme();

return (
<Portal>
<Transition in={isOpen} variant="fade">
<Box className={cx('wk-modal', clsModal, className)} {...restProps}>
<Box
className={cx('wk-modal', clsModal, className)}
style={{
colorScheme: colorMode,
}}
{...restProps}
>
<Box
className={cx('wk-modal-overlay', clsModalOverlay)}
onClick={() => closeOnOverlayClick && onClose()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ export const clsContent = style({
flexDirection: 'column',
textAlign: 'center',
gap: 8,
overflow: 'hidden',
});
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8c8c1f2

Please sign in to comment.