mirror of
https://github.com/rjNemo/React-SaaS-sample
synced 2026-06-06 05:06:38 +00:00
37 lines
725 B
JavaScript
37 lines
725 B
JavaScript
import React from "react";
|
|
import BackgroundImage from "./BackgroundImage";
|
|
import "./Section.scss";
|
|
|
|
function Section(props) {
|
|
const {
|
|
color,
|
|
size,
|
|
backgroundImage,
|
|
backgroundImageOpacity,
|
|
children,
|
|
// Passed to section element
|
|
...otherProps
|
|
} = props;
|
|
|
|
return (
|
|
<section
|
|
className={
|
|
"SectionComponent hero section is-block is-relative" +
|
|
(color ? ` is-${color}` : "") +
|
|
(size ? ` is-${size}` : "")
|
|
}
|
|
{...otherProps}
|
|
>
|
|
{backgroundImage && (
|
|
<BackgroundImage
|
|
image={backgroundImage}
|
|
opacity={backgroundImageOpacity}
|
|
/>
|
|
)}
|
|
|
|
{props.children}
|
|
</section>
|
|
);
|
|
}
|
|
|
|
export default Section;
|