diff --git a/.gitignore b/.gitignore
index 964f8c52e7..7c940fe464 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,6 +5,7 @@ coverage/
dist/
docs/build/
docs/app/docgenInfo.json
+docs/app/menuInfo.json
dll/
.DS_Store
diff --git a/docs/app/Components/ComponentDoc/ComponentDoc.js b/docs/app/Components/ComponentDoc/ComponentDoc.js
index 8adb676aed..3e32b26267 100644
--- a/docs/app/Components/ComponentDoc/ComponentDoc.js
+++ b/docs/app/Components/ComponentDoc/ComponentDoc.js
@@ -1,252 +1,73 @@
-import cx from 'classnames'
-import _ from 'lodash'
import PropTypes from 'prop-types'
-import React, { Component } from 'react'
+import React, {Component} from 'react'
import DocumentTitle from 'react-document-title'
-import { Link } from 'react-router-dom'
+import {Grid} from 'semantic-ui-react'
-import { repoURL } from 'docs/app/utils'
-import { META } from 'src/lib'
-import * as semanticUIReact from 'src'
-import docgenInfo from '../../docgenInfo.json'
import ComponentExamples from './ComponentExamples'
import ComponentProps from './ComponentProps'
+import ComponentDocHeader from './ComponentDocHeader'
+import ComponentDocLinks from './ComponentDocLinks'
+import ComponentDocSee from './ComponentDocSee'
+import ComponentSidebar from './ComponentSidebar'
-const { Divider, Grid, Header, Icon, List } = semanticUIReact
-
-const docgenPaths = _.keys(docgenInfo)
-
-const pathSepRegEx = new RegExp(_.escapeRegExp(__PATH_SEP__), 'g')
-
-const getDocgenPath = componentName => _.find(docgenPaths, path => (
- new RegExp(`${__PATH_SEP__}${componentName}.js$`).test(path)
-))
-
-// no matter the OS path separator, use '/'
-const getPosixPath = componentName => getDocgenPath(componentName).replace(pathSepRegEx, '/')
-
-const getGithubSourceUrl = (componentName) => {
- const posixPath = getPosixPath(componentName)
- return `${repoURL}/blob/master/${posixPath}`
-}
-
-const getGithubEditUrl = (componentName) => {
- const posixPath = getPosixPath(componentName)
- return `${repoURL}/edit/master/${posixPath}`
-}
-
-const getSemanticUIDocsUrl = _meta => (
- `https://semantic-ui.com/${_meta.type}s/${_meta.parent || _meta.name}`.toLowerCase()
-)
-
-const showPropsStyle = {
- display: 'inline-flex',
- margin: '1em 0.5em',
- marginLeft: 0,
- cursor: 'pointer',
-}
-
-const subDescriptionStyle = {
- fontSize: '1.08em',
- color: '#777',
-}
-
-const linkListStyle = {
- position: 'absolute',
- padding: '0.5em',
- margin: '0.5em',
- top: '0',
- right: '0',
- boxShadow: '0 0 1em 0.5em #f7f7f7',
- background: '#f7f7f7',
-}
+const topRowStyle = {margin: '1em'}
export default class ComponentDoc extends Component {
- static propTypes = {
- _meta: PropTypes.object,
- }
-
- componentWillMount() {
- this.setState({
- showPropsFor: this.props._meta.name,
- })
- }
-
- componentWillReceiveProps(nextProps) {
- this.setState({
- showPropsFor: this.state.showPropsFor ? nextProps._meta.name : null,
- })
+ static childContextTypes = {
+ onTopPassed: PropTypes.func
}
- toggleProps = (name) => {
- this.setState({
- showPropsFor: this.state.showPropsFor === name ? null : name,
- })
- }
-
- renderSee() {
- const { _meta } = this.props
- const docPath = getDocgenPath(_meta.name)
- const docgen = docgenInfo[docPath]
- const seeTags = _.filter(docgen.docBlock.tags, ['title', 'see'])
-
- const seeLinks = _.map(seeTags, ({ description }) => {
- const seeMeta = _.get(semanticUIReact[description], '_meta')
- if (!seeMeta) return
-
- const { type, name } = seeMeta
-
- return (
-
- {description}
-
- )
- })
-
- // still render empty lists to reserve the whitespace
- return (
-
-
-
- {seeLinks.length > 0 ? 'See:' : ' '}
-
-
- {seeLinks}
-
- )
+ static propTypes = {
+ _meta: PropTypes.object,
}
- renderSemanticDocsLink = () => {
- const { _meta } = this.props
-
- if (META.isAddon(_meta)) return null
+ state = {}
- return (
-
-
-
-
- Semantic UI {_meta.parent || _meta.name} Docs
-
-
-
- )
+ getChildContext() {
+ return {
+ onTopPassed: this.handleExampleTopPassed,
+ };
}
- renderGithubSourceLink() {
- const { _meta } = this.props
- const docPath = getDocgenPath(_meta.name)
- // no matter the OS path separator, use '/' since these link to github
- const posixPath = docPath.replace(pathSepRegEx, '/')
- return (
-
-
-
-
- {posixPath}
-
-
-
- )
+ handleExampleTopPassed = (e, { examplePath, title }) => {
+ console.log(title)
+ this.setState({ activePath: examplePath })
}
- renderProps = () => {
- const { _meta } = this.props
- const { showPropsFor } = this.state
-
- const itemCX = name => cx(showPropsFor === name && 'active', 'link item')
- const selectedDocgen = docgenInfo[getDocgenPath(showPropsFor)]
- const toggleIcon = `toggle ${showPropsFor ? 'on' : 'off'}`
-
- const subComponents = _.flatMap(semanticUIReact, SDComponent => _.filter(SDComponent, staticValue => (
- _.get(staticValue, '_meta.parent') === _meta.name
- )))
-
- const hasSubComponents = !_.isEmpty(subComponents)
- const showSubDescription = hasSubComponents && _.get(selectedDocgen, 'docBlock.description')
-
- const subComponentItems = _.map(subComponents, ({ _meta: { name } }) => (
-
this.toggleProps(name)}>
- {_meta.name}.{name.replace(_meta.name, '')}
-
- ))
-
- return (
-
{title}
@@ -25,10 +25,10 @@ const ComponentPropsExtra = ({ children, inline, title, ...rest }) => (
)
-ComponentPropsExtra.propTypes = {
+ComponentPropExtra.propTypes = {
children: PropTypes.node,
inline: PropTypes.bool,
title: PropTypes.node,
}
-export default ComponentPropsExtra
+export default ComponentPropExtra
diff --git a/docs/app/Components/ComponentDoc/ComponentProps/ComponentPropsFunctionSignature.js b/docs/app/Components/ComponentDoc/ComponentProp/ComponentPropFunctionSignature.js
similarity index 78%
rename from docs/app/Components/ComponentDoc/ComponentProps/ComponentPropsFunctionSignature.js
rename to docs/app/Components/ComponentDoc/ComponentProp/ComponentPropFunctionSignature.js
index 0c818bbc7f..6c17584045 100644
--- a/docs/app/Components/ComponentDoc/ComponentProps/ComponentPropsFunctionSignature.js
+++ b/docs/app/Components/ComponentDoc/ComponentProp/ComponentPropFunctionSignature.js
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types'
import React from 'react'
import { neverUpdate } from 'docs/app/HOC'
-import ComponentPropsExtra from './ComponentPropsExtra'
+import ComponentPropExtra from './ComponentPropExtra'
const descriptionStyle = {
flex: '5 5 0',
@@ -22,7 +22,7 @@ const rowStyle = {
const getTagType = tag => (tag.type.type === 'AllLiteral' ? 'any' : tag.type.name)
-const ComponentPropsFunctionSignature = ({ name, tags }) => {
+const ComponentPropFunctionSignature = ({ name, tags }) => {
const params = _.filter(tags, { title: 'param' })
const returns = _.find(tags, { title: 'returns' })
@@ -51,15 +51,15 @@ const ComponentPropsFunctionSignature = ({ name, tags }) => {
})
return (
-
{name}({paramSignature}){returns ? `: ${getTagType(returns)}` : ''}}>
+ {name}({paramSignature}){returns ? `: ${getTagType(returns)}` : ''}}>
{tagDescriptionRows}
-
+
)
}
-ComponentPropsFunctionSignature.propTypes = {
+ComponentPropFunctionSignature.propTypes = {
name: PropTypes.string,
tags: PropTypes.object,
}
-export default neverUpdate(ComponentPropsFunctionSignature)
+export default neverUpdate(ComponentPropFunctionSignature)
diff --git a/docs/app/Components/ComponentDoc/ComponentProp/ComponentPropHeader.js b/docs/app/Components/ComponentDoc/ComponentProp/ComponentPropHeader.js
new file mode 100644
index 0000000000..a535f4aac5
--- /dev/null
+++ b/docs/app/Components/ComponentDoc/ComponentProp/ComponentPropHeader.js
@@ -0,0 +1,17 @@
+import React from 'react'
+import { Table } from 'semantic-ui-react'
+
+import { neverUpdate } from 'docs/app/HOC'
+
+const ComponentPropTableHeader = () => (
+
+
+ Name
+ Default
+ Type
+ Description
+
+
+)
+
+export default neverUpdate(ComponentPropTableHeader)
diff --git a/docs/app/Components/ComponentDoc/ComponentProps/ComponentPropsName.js b/docs/app/Components/ComponentDoc/ComponentProp/ComponentPropName.js
similarity index 80%
rename from docs/app/Components/ComponentDoc/ComponentProps/ComponentPropsName.js
rename to docs/app/Components/ComponentDoc/ComponentProp/ComponentPropName.js
index 1ab990d885..60043a4401 100644
--- a/docs/app/Components/ComponentDoc/ComponentProps/ComponentPropsName.js
+++ b/docs/app/Components/ComponentDoc/ComponentProp/ComponentPropName.js
@@ -6,7 +6,7 @@ import { pure } from 'docs/app/HOC'
const popupStyle = { padding: '0.5em' }
-const ComponentPropsName = ({ name, required }) => (
+const ComponentPropName = ({ name, required }) => (
{name}
{required && (
@@ -22,9 +22,9 @@ const ComponentPropsName = ({ name, required }) => (
)
-ComponentPropsName.propTypes = {
+ComponentPropName.propTypes = {
name: PropTypes.string,
required: PropTypes.bool,
}
-export default pure(ComponentPropsName)
+export default pure(ComponentPropName)
diff --git a/docs/app/Components/ComponentDoc/ComponentProps/ComponentProps.js b/docs/app/Components/ComponentDoc/ComponentProps/ComponentProps.js
index b78a19873c..28332eeca6 100644
--- a/docs/app/Components/ComponentDoc/ComponentProps/ComponentProps.js
+++ b/docs/app/Components/ComponentDoc/ComponentProps/ComponentProps.js
@@ -1,34 +1,59 @@
-import _ from 'lodash'
import PropTypes from 'prop-types'
-import React from 'react'
-import { Table } from 'semantic-ui-react'
+import React, { Component } from 'react'
+import { getDocSubComponents } from 'docs/app/utils'
+import ComponentTable from '../ComponentTable'
+import ComponentPropsComponentDescription from './ComponentPropsComponentDescription'
import ComponentPropsHeader from './ComponentPropsHeader'
-import ComponentPropsRow from './ComponentPropsRow'
-
-/**
- * Displays a table of a Component's PropTypes.
- */
-const ComponentProps = ({ props: propsDefinition }) => (
-
-
-
- {_.map(propsDefinition, item => )}
-
-
-)
-
-ComponentProps.propTypes = {
- /**
- * A single Component's prop info as generated by react-docgen.
- * @type {object} Props info object where keys are prop names and values are prop definitions.
- */
- props: PropTypes.object,
- /**
- * A single Component's meta info.
- * @type {object} Meta info object where enum prop values are defined.
- */
- meta: PropTypes.object,
-}
+import ComponentPropsComponents from './ComponentPropsComponents'
+
+export default class ComponentProps extends Component {
+ static propTypes = {
+ componentName: PropTypes.string,
+ }
+
+ constructor(props) {
+ super(props)
+
+ this.state = { activeName: props.componentName }
+ }
+
+ componentWillReceiveProps({ componentName: next }) {
+ const current = this.props.componentName
+
+ if (current !== next) this.setState({ activeName: next })
+ }
-export default ComponentProps
+ handleComponentClick = (e, { name }) => this.setState({ activeName: name })
+
+ handleToggle = () => this.setState({ activeName: this.state.activeName ? false : this.props.componentName })
+
+ render() {
+ const { componentName } = this.props
+ const { activeName } = this.state
+ const subComponents = getDocSubComponents(componentName)
+
+ return (
+
+
0}
+ showProps={activeName}
+ onClick={this.handleToggle}
+ />
+
+
+ {activeName && (
+
+
+
+
+ )}
+
+ )
+ }
+}
diff --git a/docs/app/Components/ComponentDoc/ComponentProps/ComponentPropsComponent.js b/docs/app/Components/ComponentDoc/ComponentProps/ComponentPropsComponent.js
new file mode 100644
index 0000000000..0f6f397a9a
--- /dev/null
+++ b/docs/app/Components/ComponentDoc/ComponentProps/ComponentPropsComponent.js
@@ -0,0 +1,23 @@
+import PropTypes from 'prop-types'
+import React from 'react'
+import { Menu } from 'semantic-ui-react'
+
+import { updateForKeys } from 'docs/app/HOC'
+
+const ComponentPropsComponent = ({ active, name, onClick, parent }) => (
+
+)
+
+ComponentPropsComponent.propTypes = {
+ active: PropTypes.bool,
+ name: PropTypes.string,
+ onClick: PropTypes.func,
+ parent: PropTypes.string,
+}
+
+export default updateForKeys(['active'])(ComponentPropsComponent)
diff --git a/docs/app/Components/ComponentDoc/ComponentProps/ComponentPropsComponentDescription.js b/docs/app/Components/ComponentDoc/ComponentProps/ComponentPropsComponentDescription.js
new file mode 100644
index 0000000000..31e0132c3c
--- /dev/null
+++ b/docs/app/Components/ComponentDoc/ComponentProps/ComponentPropsComponentDescription.js
@@ -0,0 +1,24 @@
+import PropTypes from 'prop-types'
+import React from 'react'
+import { Divider } from 'semantic-ui-react'
+
+import { pure } from 'docs/app/HOC'
+import { getDocDescription } from 'docs/app/utils'
+
+const descriptionStyle = {
+ fontSize: '1.08em',
+ color: '#777',
+}
+
+const ComponentPropsComponent = ({ name }) => (
+
+ {getDocDescription(name)}
+
+
+)
+
+ComponentPropsComponent.propTypes = {
+ name: PropTypes.string,
+}
+
+export default pure(ComponentPropsComponent)
diff --git a/docs/app/Components/ComponentDoc/ComponentProps/ComponentPropsComponents.js b/docs/app/Components/ComponentDoc/ComponentProps/ComponentPropsComponents.js
new file mode 100644
index 0000000000..7c68d350ba
--- /dev/null
+++ b/docs/app/Components/ComponentDoc/ComponentProps/ComponentPropsComponents.js
@@ -0,0 +1,34 @@
+import _ from 'lodash'
+import PropTypes from 'prop-types'
+import React from 'react'
+import { Menu } from 'semantic-ui-react'
+
+import { updateForKeys } from 'docs/app/HOC'
+import ComponentPropsSubComponent from './ComponentPropsComponent'
+
+const ComponentPropsComponents = ({ activeName, components, onItemClick, parent }) =>
+ components.length > 0 && (
+
+ )
+
+ComponentPropsComponents.propTypes = {
+ activeName: PropTypes.oneOf([
+ PropTypes.bool,
+ PropTypes.string,
+ ]),
+ components: PropTypes.array,
+ onItemClick: PropTypes.func,
+ parent: PropTypes.string,
+}
+
+export default updateForKeys(['activeName', 'parent'])(ComponentPropsComponents)
diff --git a/docs/app/Components/ComponentDoc/ComponentProps/ComponentPropsDefaultValue.js b/docs/app/Components/ComponentDoc/ComponentProps/ComponentPropsDefaultValue.js
deleted file mode 100644
index 689ee154a1..0000000000
--- a/docs/app/Components/ComponentDoc/ComponentProps/ComponentPropsDefaultValue.js
+++ /dev/null
@@ -1,13 +0,0 @@
-import _ from 'lodash'
-import PropTypes from 'prop-types'
-import React from 'react'
-
-import { pure } from 'docs/app/HOC'
-
-const ComponentPropsDefaultValue = ({ value }) => (_.isNil(value) ? null :
{value}
)
-
-ComponentPropsDefaultValue.propTypes = {
- value: PropTypes.node,
-}
-
-export default pure(ComponentPropsDefaultValue)
diff --git a/docs/app/Components/ComponentDoc/ComponentProps/ComponentPropsHeader.js b/docs/app/Components/ComponentDoc/ComponentProps/ComponentPropsHeader.js
index abf98a9750..434bf48a36 100644
--- a/docs/app/Components/ComponentDoc/ComponentProps/ComponentPropsHeader.js
+++ b/docs/app/Components/ComponentDoc/ComponentProps/ComponentPropsHeader.js
@@ -1,17 +1,45 @@
+import cx from 'classnames'
+import PropTypes from 'prop-types'
import React from 'react'
-import { Table } from 'semantic-ui-react'
+import { Header, Icon } from 'semantic-ui-react'
-import { neverUpdate } from 'docs/app/HOC'
+import { updateForKeys } from 'docs/app/HOC'
-const ComponentPropsHeader = () => (
-
-
- Name
- Default
- Type
- Description
-
-
-)
+const headerStyle = {
+ cursor: 'pointer',
+ display: 'inline-flex',
+ margin: '1em 0.5em',
+ marginLeft: 0,
+}
-export default neverUpdate(ComponentPropsHeader)
+const linkStyle = { color: 'inherit' }
+
+const ComponentPropsHeader = ({ hasSubComponents, onClick, showProps }) => {
+ const iconClasses = cx(
+ showProps ? 'on' : 'off',
+ 'toggle',
+ )
+
+ return (
+
+ )
+}
+
+ComponentPropsHeader.propTypes = {
+ hasSubComponents: PropTypes.bool,
+ onClick: PropTypes.func,
+ showProps: PropTypes.bool,
+}
+
+export default updateForKeys(['hasSubComponents', 'showProps'])(ComponentPropsHeader)
diff --git a/docs/app/Components/ComponentDoc/ComponentSidebar.js b/docs/app/Components/ComponentDoc/ComponentSidebar.js
new file mode 100644
index 0000000000..2a587c0a2d
--- /dev/null
+++ b/docs/app/Components/ComponentDoc/ComponentSidebar.js
@@ -0,0 +1,47 @@
+import _ from 'lodash'
+import React, {Component} from 'react'
+import {Accordion, Menu, Sticky} from 'semantic-ui-react'
+import { withRouter } from 'react-router'
+
+import { scrollToAnchor } from 'docs/app/utils'
+import menuInfo from 'docs/app/menuInfo.json'
+
+const sidebarStyle = {
+ background: '#fff',
+ boxShadow: '0 2px 2px rgba(0, 0, 0, 0.1)',
+ paddingLeft: '1em',
+ paddingTop: '0.1em',
+}
+
+class ComponentSidebar extends Component {
+ setHashAndScroll = (e, {name}) => {
+ const aName = _.kebabCase(_.last(name.split('/')))
+ const { history } = this.props
+ history.replace(`${location.pathname}#${aName}`)
+ scrollToAnchor()
+ }
+
+ render() {
+ const {activePath, componentName, examplesRef} = this.props
+ const items = _.get(menuInfo, componentName)
+
+ return (
+
+
+
+ )
+ }
+}
+
+export default withRouter(ComponentSidebar)
\ No newline at end of file
diff --git a/docs/app/Components/ComponentDoc/ComponentTable/ComponentTable.js b/docs/app/Components/ComponentDoc/ComponentTable/ComponentTable.js
new file mode 100644
index 0000000000..5e1050c992
--- /dev/null
+++ b/docs/app/Components/ComponentDoc/ComponentTable/ComponentTable.js
@@ -0,0 +1,26 @@
+import _ from 'lodash'
+import PropTypes from 'prop-types'
+import React from 'react'
+import { Table } from 'semantic-ui-react'
+
+import { getDocProps } from 'docs/app/utils'
+import ComponentTableHeader from './ComponentTableHeader'
+import ComponentTableRow from './ComponentTableRow'
+
+/**
+ * Displays a table of a Component's PropTypes.
+ */
+const ComponentTable = ({ name }) => (
+
+
+
+ {_.map(getDocProps(name), item => )}
+
+
+)
+
+ComponentTable.propTypes = {
+ name: PropTypes.string,
+}
+
+export default ComponentTable
diff --git a/docs/app/Components/ComponentDoc/ComponentTable/ComponentTableHeader.js b/docs/app/Components/ComponentDoc/ComponentTable/ComponentTableHeader.js
new file mode 100644
index 0000000000..7079a6fb91
--- /dev/null
+++ b/docs/app/Components/ComponentDoc/ComponentTable/ComponentTableHeader.js
@@ -0,0 +1,17 @@
+import React from 'react'
+import { Table } from 'semantic-ui-react'
+
+import { neverUpdate } from 'docs/app/HOC'
+
+const ComponentTableHeader = () => (
+
+
+ Name
+ Default
+ Type
+ Description
+
+
+)
+
+export default neverUpdate(ComponentTableHeader)
diff --git a/docs/app/Components/ComponentDoc/ComponentProps/ComponentPropsRow.js b/docs/app/Components/ComponentDoc/ComponentTable/ComponentTableRow.js
similarity index 59%
rename from docs/app/Components/ComponentDoc/ComponentProps/ComponentPropsRow.js
rename to docs/app/Components/ComponentDoc/ComponentTable/ComponentTableRow.js
index f3b3333d34..93103fb0f6 100644
--- a/docs/app/Components/ComponentDoc/ComponentProps/ComponentPropsRow.js
+++ b/docs/app/Components/ComponentDoc/ComponentTable/ComponentTableRow.js
@@ -2,13 +2,13 @@ import PropTypes from 'prop-types'
import React, { Component } from 'react'
import { Table } from 'semantic-ui-react'
-import ComponentPropsDefaultValue from './ComponentPropsDefaultValue'
-import ComponentPropsDescription from './ComponentPropsDescription'
-import ComponentPropsEnum from './ComponentPropsEnum'
-import ComponentPropsFunctionSignature from './ComponentPropsFunctionSignature'
-import ComponentPropsName from './ComponentPropsName'
+import ComponentPropDefaultValue from '../ComponentProp/ComponentPropDefaultValue'
+import ComponentPropDescription from '../ComponentProp/ComponentPropDescription'
+import ComponentPropEnum from '../ComponentProp/ComponentPropEnum'
+import ComponentPropFunctionSignature from '../ComponentProp/ComponentPropFunctionSignature'
+import ComponentPropName from '../ComponentProp/ComponentPropName'
-export default class ComponentPropsRow extends Component {
+export default class ComponentTableRow extends Component {
static propTypes = {
defaultValue: PropTypes.string,
description: PropTypes.string,
@@ -33,16 +33,16 @@ export default class ComponentPropsRow extends Component {
return (
-
+
-
+
{`{${type}}`}
-
-
-
+
+ (
diff --git a/docs/app/Examples/behaviors/Visibility/Settings/VisibilityExampleCallbackFrequency.js b/docs/app/Examples/behaviors/Visibility/Settings/VisibilityExampleCallbackFrequency.js
index f2aaa0e5b3..3c314f36ad 100644
--- a/docs/app/Examples/behaviors/Visibility/Settings/VisibilityExampleCallbackFrequency.js
+++ b/docs/app/Examples/behaviors/Visibility/Settings/VisibilityExampleCallbackFrequency.js
@@ -11,7 +11,7 @@ export default class VisibilityExampleCallbackFrequency extends Component {
once: true,
}
- handleContextRef = contextRef => this.setState({ contextRef })
+ handleContextRef = contextRef => this.setState({ examplesRef: contextRef })
updateLog = eventName => () => this.setState(({
log: [
diff --git a/docs/app/Examples/behaviors/Visibility/Settings/VisibilityExampleGroupedCallbacks.js b/docs/app/Examples/behaviors/Visibility/Settings/VisibilityExampleGroupedCallbacks.js
index 9652bfb6a6..6220d4f6c8 100644
--- a/docs/app/Examples/behaviors/Visibility/Settings/VisibilityExampleGroupedCallbacks.js
+++ b/docs/app/Examples/behaviors/Visibility/Settings/VisibilityExampleGroupedCallbacks.js
@@ -11,7 +11,7 @@ export default class VisibilityExampleGroupedCallbacks extends Component {
once: true,
}
- handleContextRef = contextRef => this.setState({ contextRef })
+ handleContextRef = contextRef => this.setState({ examplesRef: contextRef })
updateLog = eventName => () => this.setState(({
log: [
diff --git a/docs/app/Examples/behaviors/Visibility/Settings/VisibilityExampleOffset.js b/docs/app/Examples/behaviors/Visibility/Settings/VisibilityExampleOffset.js
index 6b7a9c823e..4b0bed04d7 100644
--- a/docs/app/Examples/behaviors/Visibility/Settings/VisibilityExampleOffset.js
+++ b/docs/app/Examples/behaviors/Visibility/Settings/VisibilityExampleOffset.js
@@ -13,7 +13,7 @@ export default class VisibilityExampleOffset extends Component {
},
}
- handleContextRef = contextRef => this.setState({ contextRef })
+ handleContextRef = contextRef => this.setState({ examplesRef: contextRef })
handleUpdate = (e, { calculations }) => this.setState({ calculations })
diff --git a/docs/app/Examples/behaviors/Visibility/Types/VisibilityExampleVisibility.js b/docs/app/Examples/behaviors/Visibility/Types/VisibilityExampleVisibility.js
index 418c85f676..8cce836808 100644
--- a/docs/app/Examples/behaviors/Visibility/Types/VisibilityExampleVisibility.js
+++ b/docs/app/Examples/behaviors/Visibility/Types/VisibilityExampleVisibility.js
@@ -21,7 +21,7 @@ export default class VisibilityExampleVisibility extends Component {
},
}
- handleContextRef = contextRef => this.setState({ contextRef })
+ handleContextRef = contextRef => this.setState({ examplesRef: contextRef })
handleUpdate = (e, { calculations }) => this.setState({ calculations })
diff --git a/docs/app/Examples/modules/Sticky/Types/StickyAdjacentContextExample.js b/docs/app/Examples/modules/Sticky/Types/StickyAdjacentContextExample.js
index adc443cc94..053b4a12f9 100644
--- a/docs/app/Examples/modules/Sticky/Types/StickyAdjacentContextExample.js
+++ b/docs/app/Examples/modules/Sticky/Types/StickyAdjacentContextExample.js
@@ -7,7 +7,7 @@ const Placeholder = () =>
export default class StickyAdjacentContextExample extends Component {
state = {}
- handleContextRef = contextRef => this.setState({ contextRef })
+ handleContextRef = contextRef => this.setState({ examplesRef: contextRef })
render() {
const { contextRef } = this.state
diff --git a/docs/app/Examples/modules/Sticky/Types/StickyPushingExample.js b/docs/app/Examples/modules/Sticky/Types/StickyPushingExample.js
index 3ca1848d07..00d2de29ba 100644
--- a/docs/app/Examples/modules/Sticky/Types/StickyPushingExample.js
+++ b/docs/app/Examples/modules/Sticky/Types/StickyPushingExample.js
@@ -7,7 +7,7 @@ const Placeholder = () =>
export default class StickyPushingExample extends Component {
state = {}
- handleContextRef = contextRef => this.setState({ contextRef })
+ handleContextRef = contextRef => this.setState({ examplesRef: contextRef })
render() {
const { contextRef } = this.state
diff --git a/docs/app/Examples/modules/Sticky/Usage/StickyOffsetExample.js b/docs/app/Examples/modules/Sticky/Usage/StickyOffsetExample.js
index 9714e97fd9..08b7d0e70a 100644
--- a/docs/app/Examples/modules/Sticky/Usage/StickyOffsetExample.js
+++ b/docs/app/Examples/modules/Sticky/Usage/StickyOffsetExample.js
@@ -7,7 +7,7 @@ const Placeholder = () =>
export default class StickyOffsetExample extends Component {
state = {}
- handleContextRef = contextRef => this.setState({ contextRef })
+ handleContextRef = contextRef => this.setState({ examplesRef: contextRef })
render() {
const { contextRef } = this.state
diff --git a/docs/app/Examples/modules/Sticky/Variations/StickyOversizedExample.js b/docs/app/Examples/modules/Sticky/Variations/StickyOversizedExample.js
index 89fb491cb7..b0856d1297 100644
--- a/docs/app/Examples/modules/Sticky/Variations/StickyOversizedExample.js
+++ b/docs/app/Examples/modules/Sticky/Variations/StickyOversizedExample.js
@@ -7,7 +7,7 @@ const Placeholder = () =>
export default class StickyOversizedExample extends Component {
state = {}
- handleContextRef = contextRef => this.setState({ contextRef })
+ handleContextRef = contextRef => this.setState({ examplesRef: contextRef })
render() {
const { contextRef } = this.state
diff --git a/docs/app/Style.js b/docs/app/Style.js
index 5403c89b2d..f8338016ad 100644
--- a/docs/app/Style.js
+++ b/docs/app/Style.js
@@ -19,8 +19,6 @@ style.menu = {
style.main = {
marginLeft: sidebarWidth,
- minWidth: parseInt(sidebarWidth, 10) + 300,
- maxWidth: parseInt(sidebarWidth, 10) + 900,
}
export default style
diff --git a/docs/app/index.ejs b/docs/app/index.ejs
index 5a472dceac..2c709f9b34 100644
--- a/docs/app/index.ejs
+++ b/docs/app/index.ejs
@@ -71,8 +71,8 @@
-
-
+
+