How to use the @artsy/reaction/dist/Components/Publishing/Sections/SectionContainer.getSectionWidth function in @artsy/reaction

To help you get started, we’ve selected a few @artsy/reaction examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github artsy / positron / src / client / apps / edit / components / content / section_tool / index.tsx View on Github external
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 (
github artsy / positron / src / client / apps / edit / components / content / sections / footer / index.tsx View on Github external
render() {
    const { article, isEditorial, onChangeArticleAction } = this.props
    const width = getSectionWidth(undefined, article.layout)

    return (
      
        {isEditorial && (
          
            
          
        )}
github artsy / positron / src / client / apps / edit / components / content / section_controls / index.jsx View on Github external
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 && }
github artsy / positron / src / client / apps / edit / components / content / section_container / index.tsx View on Github external
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 && (