-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #231 from oaknational/fix/chevron-accordian-size
Fix/chevron accordian size
- Loading branch information
Showing
13 changed files
with
253 additions
and
257 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 7 additions & 3 deletions
10
...nents/atoms/ClientPortal/ClientPortal.tsx → ...rnalClientPortal/InternalClientPortal.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,20 @@ | ||
import { useEffect, useRef } from "react"; | ||
import { createPortal } from "react-dom"; | ||
type ClientPortalInterface = { | ||
|
||
type InternalClientPortalInterface = { | ||
children: React.ReactNode; | ||
show?: boolean; | ||
onClose?: () => void; | ||
}; | ||
const ClientPortal = ({ children, show }: ClientPortalInterface) => { | ||
|
||
export const InternalClientPortal = ({ | ||
children, | ||
show, | ||
}: InternalClientPortalInterface) => { | ||
const ref = useRef<Element | null>(null); | ||
|
||
useEffect(() => { | ||
ref.current = document.body; | ||
}, []); | ||
return show && ref.current ? createPortal(children, ref.current) : null; | ||
}; | ||
export default ClientPortal; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./InternalClientPortal"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.