Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
render() {
const {
article,
firstSection,
index,
isEditing,
isHero,
sections,
} = this.props
const { isOpen } = this.state
const isFirstSection = sections && firstSection && sections.length === 0
const isLastSection = sections && index === sections.length - 1
const sectionWidth = getSectionWidth(undefined, article.layout)
const isVisible = isFirstSection || isLastSection || isHero
return (
render() {
const { article, isEditorial, onChangeArticleAction } = this.props
const width = getSectionWidth(undefined, article.layout)
return (
{isEditorial && (
)}
render() {
const {
article,
children,
disabledAlert,
isHero,
section,
showLayouts,
} = this.props
const { insideComponent } = this.state
const outsidePosition = isHero ? "relative" : "absolute"
const position = insideComponent ? "fixed" : outsidePosition
const bottom = this.getPositionBottom()
const sectionWidth = getSectionWidth(section, article.layout)
const isFillwidth = !isHero && section.layout === "fillwidth"
return (
{
this.controls = node
}}
className="edit-controls"
position={position}
bottom={bottom}
isFillwidth={isFillwidth}
isHero={isHero}
width={sectionWidth}
type={!isHero ? section.type : undefined}
>
{showLayouts && }
render() {
const { article, isHero, section } = this.props
const sectionWidth = getSectionWidth(section, article.layout)
const isEditing = this.isEditing()
const isFillwidth = section.layout === "fillwidth"
return (
{!isEditing && (
{!isHero && (