mirror of
https://github.com/pds-nest/nest.git
synced 2024-11-25 06:24:19 +00:00
✨ Add more props to BoxFull
This commit is contained in:
parent
1ffd4637f9
commit
6d6825874f
1 changed files with 18 additions and 3 deletions
|
@ -7,19 +7,34 @@ import classNames from "classnames"
|
|||
* A box with both a header and a body.
|
||||
*
|
||||
* @param header - The contents of the box header.
|
||||
* @param headerClassName - Additional class(es) added to the inner `<div>` acting as the header.
|
||||
* @param headerProps - Additional props passed to the inner `<div>` acting as the header.
|
||||
* @param children - The contents of the box body.
|
||||
* @param childrenClassName - Additional class(es) added to the inner `<div>` acting as the body.
|
||||
* @param childrenProps - Additional props passed to the inner `<div>` acting as the body.
|
||||
* @param className - Additional class(es) that should be added to the outer `<div>` of the box.
|
||||
* @param props - Additional props to pass to the box.
|
||||
* @returns {JSX.Element}
|
||||
* @constructor
|
||||
*/
|
||||
export default function BoxFull({ header, children, className, ...props }) {
|
||||
export default function BoxFull(
|
||||
{
|
||||
header,
|
||||
headerClassName,
|
||||
headerProps,
|
||||
children,
|
||||
childrenClassName,
|
||||
childrenProps,
|
||||
className,
|
||||
...props
|
||||
}) {
|
||||
|
||||
return (
|
||||
<div className={classNames(Style.BoxWithHeader, className)} {...props}>
|
||||
<div className={Style.BoxHeader}>
|
||||
<div className={classNames(Style.BoxHeader, headerClassName)} {...headerProps}>
|
||||
{header}
|
||||
</div>
|
||||
<div className={Style.BoxBody}>
|
||||
<div className={classNames(Style.BoxBody, childrenClassName)} {...childrenProps}>
|
||||
{children}
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue