How to use @instructure/ui-expandable - 2 common examples

To help you get started, we’ve selected a few @instructure/ui-expandable 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 instructure / instructure-ui / packages / ui-toggle-details / src / ToggleDetails / index.js View on Github external
variant,
      iconPosition,
      fluidWidth
    } = this.props

    const positionIconAtEnd = iconPosition === 'end' && (variant === 'filled' || fluidWidth)

    const classes = {
      [styles.root]: true,
      [styles[this.props.size]]: true,
      [styles.positionIconAtEnd]: positionIconAtEnd
    }

    return (
      
      {({ expanded, getToggleProps, getDetailsProps}) => {
        return (
          <div>
            {this.renderToggle(getToggleProps(), expanded)}
            {this.renderDetails(expanded, getDetailsProps())}
          </div>
        )
      }}
      
    )
  }
}
github instructure / instructure-ui / packages / ui-toggle-details / src / ToggleGroup / index.js View on Github external
render () {
    const Element = getElementType(ToggleGroup, this.props)

    return (
      
      {({ expanded, getToggleProps, getDetailsProps }) =&gt; {
        return (

@instructure/ui-expandable

A utility component for show/hide functionality

MIT
Latest version published 8 days ago

Package Health Score

84 / 100
Full package analysis

Popular @instructure/ui-expandable functions

Similar packages