1.2.10 • Published 7 years ago

vdux-containers v1.2.10

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

containers

js-standard-style

Container components that wrap presentational components and give them state.

Installation

$ npm install vdux-containers

Containers

  • CSSContainer - Let's you pass along special props when the component is hovered, focused, or active
  • Button - Manages hover/tooltip state
  • Dropdown - Manages openness
  • MenuItem - Manages hover / css emulation

Example

import {Button} from 'vdux-ui'
import {CSSContainer} from 'vdux-containers'

function render ({props, children}) {
  return (
    <CSSContainer ui={Button} {...props} hoverProps={{...(props.hoverProps || {}), highlight: true, tooltipShown: true}}>
      {children}
    </CSSContainer>
  )
}

You can then use that button like:

function render () {
  return (
    <Button tooltip='Some hovertext!' activeProps={{border: true}}>
      Hover me!
    </Button>
  )
}

License

MIT

1.2.10

7 years ago

1.2.9

7 years ago

1.2.8

7 years ago

1.2.7

7 years ago

1.2.5

7 years ago

1.2.4

7 years ago

1.2.3

7 years ago

1.2.2

7 years ago

1.2.1

8 years ago

1.2.0

8 years ago

1.1.24

8 years ago

1.1.23

8 years ago

1.1.22

8 years ago

1.1.21

8 years ago

1.1.19

8 years ago

1.1.18

8 years ago

1.1.17

8 years ago

1.1.15

8 years ago

1.1.14

8 years ago

1.1.13

8 years ago

1.1.12

8 years ago

1.1.11

8 years ago

1.1.10

8 years ago

1.1.8

8 years ago

1.1.7

8 years ago

1.1.6

8 years ago

1.1.5

8 years ago

1.1.4

8 years ago

1.1.3

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago