Skip to content

Commit

Permalink
Merge pull request #112 from ooni/fix/modal
Browse files Browse the repository at this point in the history
Fix usage of props passed to Modal
  • Loading branch information
sarathms authored Mar 29, 2021
2 parents 5fd6d4e + 610026c commit 52686a2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# ChangeLog

## ooni-components 0.4.4 [2021-03-29]
Fixes:
* Fixed how props are passed down from Modal to Box with content (#112)

## ooni-components 0.4.3 [2021-03-26]
* No-op version bump to trigger CI

Expand Down
7 changes: 4 additions & 3 deletions components/organisms/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const ModalCloseButton = ({ position, ...props}) => (
/>
)

export const Modal = ({show, closeButton, onHideClick, ...props}) => {
export const Modal = ({show, closeButton, onHideClick, children, ...props}) => {
return (
<Box sx={{
position: 'relative',
Expand All @@ -36,10 +36,11 @@ export const Modal = ({show, closeButton, onHideClick, ...props}) => {
overflow: 'auto',
zIndex: 1050,
bg: 'white',
borderRadius: 'radius'
borderRadius: 'radius',
...props
}}>
{closeButton && <ModalCloseButton onClick={onHideClick} icon={<MdClose/>} position={closeButton} />}
{props.children}
{children}
</Box>
{show && (
<Box
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ooni-components",
"version": "0.4.3",
"version": "0.4.4",
"main": "dist/index.js",
"repository": "https://github.com/ooni/design-system.git",
"author": "Arturo Filastò <[email protected]>",
Expand Down

0 comments on commit 52686a2

Please sign in to comment.