Skip to content

Commit

Permalink
feat: bump modal version
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgeny Zakharov committed May 3, 2022
1 parent 325f892 commit 48fbd0b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 20 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -39,7 +39,7 @@
"@eslint-kit/eslint-config-patch": "^1.0.0",
"@eslint-kit/eslint-config-prettier": "^3.0.0",
"@eslint-kit/eslint-config-typescript": "^5.2.0",
"@react-above/modal": "^0.2.5",
"@react-above/modal": "^0.3.0",
"@testing-library/react-hooks": "^7.0.2",
"@types/jest": "^26.0.14",
"@types/react": "^16.9.23",
Expand Down
19 changes: 5 additions & 14 deletions src/frame.tsx
Expand Up @@ -16,23 +16,14 @@ export const Overlay = forwardRef<HTMLDivElement, DivProps>((props, ref) => (
))

export const Container = forwardRef<HTMLDivElement, DivProps>((props, ref) => (
<div
{...props}
ref={ref}
className={clsx('above-container', props.className)}
>
<div {...props} ref={ref} className={clsx('above-modal', props.className)}>
{props.children}
</div>
))

export const Frame: FrameFC = ({
screenRef,
overlayRef,
containerRef,
children,
}) => (
<Screen ref={screenRef}>
<Overlay ref={overlayRef} />
<Container ref={containerRef}>{children}</Container>
export const Frame: FrameFC = ({ refs, children }) => (
<Screen ref={refs.screen}>
<Overlay ref={refs.overlay} />
<Container ref={refs.modal}>{children}</Container>
</Screen>
)
2 changes: 1 addition & 1 deletion src/styles.scss
Expand Up @@ -27,7 +27,7 @@
background: rgba(0, 0, 0, 0.3);
}

.above-container {
.above-modal {
margin: auto;
min-width: 0;
z-index: 301;
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Expand Up @@ -649,10 +649,10 @@
"@nodelib/fs.scandir" "2.1.5"
fastq "^1.6.0"

"@react-above/modal@^0.2.5":
version "0.2.5"
resolved "https://registry.yarnpkg.com/@react-above/modal/-/modal-0.2.5.tgz#56f0b308775bce635a42324b00329348f38a2851"
integrity sha512-MN72u+l95Lh6NYXQONxu2gP5DF9EExqW3klEpuqFmtk1JHgy6qhoLMyh85IMPmxD6Ec5iI1gA9EyqpmQcftqOg==
"@react-above/modal@^0.3.0":
version "0.3.0"
resolved "https://registry.yarnpkg.com/@react-above/modal/-/modal-0.3.0.tgz#dc2276f4636472ba3654348495d7cf744d78d429"
integrity sha512-j/zuUskGJ4IgfSFlyD7h50gp6EAYqD6UzswKLBAjmPPhXn12U5UyXp7j614YDA6zSjZOWdAEF0Sxj76COKBVhA==
dependencies:
"@types/body-scroll-lock" "^3.1.0"
body-scroll-lock "^4.0.0-beta.0"
Expand Down

0 comments on commit 48fbd0b

Please sign in to comment.