How to use the react-static.withRouter function in react-static

To help you get started, we’ve selected a few react-static 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 iotaledger / documentation-platform / src / components / Dropdown.js View on Github external
return (
      
        
          {items.map(item => (
            
              {item}
            
          ))}
        
      
    );
  }
}

export default withRouter(Dropdown);

const DropdownWrapper = styled.div`
  width: 100px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
`;

const Dropdownlist = styled.select`
  position: absolute;
  background-color: #f0f6f8;
  padding: 5px 11px;
  z-index: 10;
  border: solid 1px #d8d8d8;
  border-top: none;
github FormidableLabs / victory-docs / src / containers / doc.js View on Github external
);
  }
}

DocsTemplate.propTypes = {
  children: PropTypes.array,
  doc: PropTypes.shape({
    data: PropTypes.object,
    content: PropTypes.string
  }),
  location: PropTypes.object,
  sidebarContent: PropTypes.array
};

export default withRouter(
  withRouteData(({ doc, sidebarContent, ...rest }) => (
    
  ))
);
github FormidableLabs / victory-docs / src / partials / sidebar / index.js View on Github external
]}
              />
            
          )}
        
      
    );
  }
}

Sidebar.propTypes = {
  content: PropTypes.array,
  location: PropTypes.object
};

export default withRouter(Sidebar);
github iotaledger / documentation-platform / src / components / Sidebar.js View on Github external
<div>
                  <menu>
                </menu></div>
              
            
            <div>{children}</div>
          
        )}
      /&gt;
    )
  }
}

export default withRouter(Sidebar);

const breakpoint = 800
const sidebarBackground = '#f7f7f7'

const SidebarStyles = styled.div`
  position: relative;
  width: 100%;
  max-width: 100%;
  padding-left: 300px;
  margin: 0 auto;
  transition: all 0.2s ease-out;

  @media screen and (max-width: ${breakpoint}px) {
    padding-left: 0px;
  }
github FormidableLabs / victory-docs / src / containers / themes.js View on Github external
);
  }
}

DocsTemplate.propTypes = {
  children: PropTypes.array,
  doc: PropTypes.shape({
    data: PropTypes.object
  }),
  location: PropTypes.object,
  sidebarContent: PropTypes.array
};

export default withRouter(
  withRouteData(({ doc, sidebarContent, sidebarNestedList, ...rest }) =&gt; (
    
  ))
);
github iotaledger / documentation-platform / src / components / organisms / StickyHeader / index.js View on Github external
className="sticky-header__icon-close"
                                onClick={this.handleCloseClick}
                            /&gt;
                        
                    )}
                    <button>
                
            
        );
    }
}

export default withRouter(StickyHeader);
</button>
github FormidableLabs / victory-docs / src / containers / content-with-sidebar-controller.js View on Github external
<footer>
            
          
        
      
    );
  }
}

ContentWithSidebar.propTypes = {
  children: PropTypes.array,
  content: PropTypes.array,
  sidebarContent: PropTypes.array
};

export default withRouter(ContentWithSidebar);
</footer>
github react-static / react-static / archives / old-examples / firebase-auth / src / components / SignInForm.js View on Github external
onChange={event =&gt;
            this.setState(updateByPropertyName('password', event.target.value))
          }
          type="password"
          placeholder="password"
        /&gt;
        <button type="submit" disabled="{isInvalid}">
          Sign In
        </button>
        {error &amp;&amp; <p>{error.message}</p>}
      
    )
  }
}

export default withRouter(SignInForm)