Added the className property and applied it to the div instead of the ReactFragment tag.
This commit is contained in:
parent
d281f96a40
commit
a729078328
@ -3,11 +3,12 @@ type Props = {
|
|||||||
header?: React.ReactElement,
|
header?: React.ReactElement,
|
||||||
children: React.ReactNode,
|
children: React.ReactNode,
|
||||||
footer?: React.ReactElement,
|
footer?: React.ReactElement,
|
||||||
|
className : string,
|
||||||
}
|
}
|
||||||
|
|
||||||
function BaseLayout({header, footer, children}: Props) {
|
function BaseLayout( { header, footer, children, className }: Props ) {
|
||||||
return (
|
return (
|
||||||
<>
|
<div className={className}>
|
||||||
<header>
|
<header>
|
||||||
{header}
|
{header}
|
||||||
</header>
|
</header>
|
||||||
@ -19,7 +20,7 @@ function BaseLayout({header, footer, children}: Props) {
|
|||||||
<footer>
|
<footer>
|
||||||
{footer}
|
{footer}
|
||||||
</footer>
|
</footer>
|
||||||
</>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user