mirror of
https://github.com/pds-nest/nest.git
synced 2024-11-22 04:54:18 +00:00
🐛 Fix error in BoxWithHeader
This commit is contained in:
parent
989688ce5b
commit
4f9a7bc272
1 changed files with 9 additions and 0 deletions
|
@ -18,7 +18,16 @@ export default function BoxWithHeader({ header, body, children, className, ...pr
|
|||
}
|
||||
}
|
||||
|
||||
if(header === undefined) {
|
||||
header = {}
|
||||
}
|
||||
|
||||
if(body === undefined) {
|
||||
body = {}
|
||||
}
|
||||
|
||||
if(children) {
|
||||
|
||||
if(body.children) {
|
||||
throw new Error("If directly passing `children` to BoxWithHeader, body.children should not be set.")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue