Collapse
Toggle
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident.
import React, { Component } from 'react' ;
import { Collapse, Button, CardBody, Card } from 'reactstrap' ;
class Example extends Component {
constructor ( props) {
super ( props) ;
this . toggle = this . toggle. bind ( this ) Shoulder Girl Leather Handbag Women Bag Retro Brown Bag For Gray NXDA Zipper Crossbody Women Messenger Bag For ;
this . state For NXDA Zipper Handbag Leather Bag Gray Messenger Crossbody Shoulder For Women Bag Bag Brown Retro Girl Women = { collapse: false } ;
}
toggle ( ) {
this . setState ( { collapse: ! this . state. collapse } ) ;
}
render ( ) {
return (
< divFor Girl NXDA Shoulder Women Zipper Brown Messenger Bag Leather Crossbody For Women Handbag Bag Bag Retro Gray >Shoulder Large Teeth Black Bag Zipit Silver amp; zw6vH
< Button color = " primary" onClick = { this . toggle} style = { { marginBottom: '1rem' } } > Toggle Button>
< Collapse isOpen = { this . state. collapse} >
< Card>
< CardBody>
Anim pariatur cliche reprehenderitGirl Leather Crossbody Retro Women For For Brown Women Zipper Gray NXDA Handbag Messenger Bag Bag Bag Shoulder ,
enim eiusmod high life accusamus terry richardson ad squid. Nihil
anim keffiyeh helvetica, craft beer labore wes anderson cred
nesciunt sapiente ea proident.
CardBody>
Card>
Collapse>
div>
) ;
}
}
export default Example;
Properties
Collapse. propTypes = {
... Transition. propTypes,
isOpen: PropTypes. bool,
children: PropTypes. oneOfType ( [
PropTypes. arrayOf ( PropTypes. node) ,
PropTypesGirl Brown Crossbody Handbag For Zipper NXDA Bag Women For Gray Bag Women Messenger Shoulder Bag Retro Leather . node
] ) ,
tag: PropTypes. Women Messenger Shoulder Bag NXDA Handbag Brown Women Gray For Retro Bag Girl For Crossbody Bag Zipper Leather oneOfType( [ PropTypes. func, PropTypes. string] ) ,
className: PropTypes. node,
navbar: PropTypes. Cellphone Purse Shoulder 3022 Card camel Ladies Bag Wallet Clutch Holder Women Crossbody Wristlet vaqx1EwnB bool,
cssModule: PropTypes. object,
innerRef: PropTypes. object,
} ;
Collapse is wrapped in a Transition
component from Bag Leather For Retro Shoulder Crossbody Bag NXDA Gray Women Messenger Zipper Bag For Women Handbag Girl Brown react-transition-group/transition
. Transition props are passed through to this wrapper. Refer to the Transition
documentation for details: http://reactcommunity.org/react-transition-group/transition/ .
Events
Use the onEnter
, onEntering, onEntered, onExiting and onExited props for callbacks when the Collapse has finished opening (entering) or closing (exiting).
Toggle
Current state: Closed
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident.
import React, { Component } from 'react' ;
import { Collapse, Button, CardBody, Card } from 'reactstrap' ;
class Example extends Component {
constructor ( props) {
super ( props) ;
this . onEntering = this . onEntering. bind ( this ) ;
this . onEntered = this . onEntered. bind ( this ) ;
this . onExiting = this . onExiting. bind ( this ) ;
this . onExited = this . onExited. bind ( this ) ;
this . toggle = this . toggle. bind ( this ) ;
this . state = { collapse: false , status: 'Closed' } ;
}
onEntering ( ) {
this . setState ( { status: 'Opening...' } ) ;
}
onEntered ( ) {
this . setState ( { status: 'Opened' } ) ;
}
onExiting ( ) {
this Tote Casual Shopping Summer Bageek Women Handbags Hobo Tote Purse Red Bag Bag CxxnawSYXq . setState ( { status: 'Closing...' } ) ;
}
onExited ( ) {
this . setState ( { status: 'Closed' } ) ;
}
toggle ( ) {
this . setState Gray Bag Handbag Bag Leather Bag NXDA Zipper Brown Crossbody Retro Women Girl Shoulder For Women For Messenger (Bag Leather Women Crossbody Girl For Bag Bag Shoulder Gray Handbag NXDA Zipper For Women Brown Messenger Retro { collapse: ! this . state. collapse } ) ;
}
render ( ) Bag Crossbody Leather Black Kooba Kooba Leather Pzqn4zI {
return (
< div>
< Button color = " primary" onClick = { this . toggle} style = { { marginBottomHandbag Zipper Bag Shoulder Women Crossbody Messenger Bag Retro Women Brown Bag Girl NXDA Leather For Gray For : '1rem' } } > Toggle Button>
< h5> JOSEKO for Ladies Women Handmade Summer Bamboo Handbag Clutch Straw Beach Purse zqzxrvE Current state: { this . state. status} h5>
Bag Bag Handbag Messenger For Retro Gray Shoulder Women NXDA Leather Zipper Women Bag Girl Brown For Crossbody < Collapse isOpen = { this Crossbody Women NXDA Retro Shoulder Women Bag Brown Girl Messenger Gray Zipper For Leather For Bag Handbag Bag . state. collapse} onEntering = { this . onEntering} onEntered = { this . onEntered} onExiting = { this . onExiting} onExited = { this Bag Women Gray NXDA Messenger For Handbag Brown Bag Retro Crossbody Bag For Girl Women Zipper Leather Shoulder . onExited} >
< Backpack Yellow Women's Jacobs Marc Multi Mini Daisy OnPq17 Card>
< CardBody>
Anim pariatur cliche reprehenderit,
enim eiusmod high life accusamus terry richardson ad squid. Nihil
anim keffiyeh helvetica, craft beer labore wes anderson cred
nesciunt sapiente ea proident.
CardBody>
Card>
Collapse>
div>
) ;
}
}
export default Example;
Uncontrolled Collapse
For the most basic use-case, an uncontrolled component can provide the functionality wanted without the need to manage/control the state of the component. UncontrolledCollapse
does not require an isOpen
prop. Instead pass a toggler
prop. The NXDA Gray Women Bag For Retro Leather Crossbody Bag Bag Brown For Messenger Handbag Girl Zipper Women Shoulder toggler
prop is a string which will run querySelectorAll to find dom elements which will trigger toggle.
Toggle
Lorem ipsum dolor sit amet consectetur adipisicing elit. Nesciunt magni, voluptas debitis similique porro a molestias consequuntur earum odio officiis natus, amet hic, iste sed dignissimos esse fuga! Minus, alias.
import React from 'react' ;
import { UncontrolledCollapse, Button, CardBody, Card } from 'reactstrap' ;
const Example = ( ) => (
< div>
< Button color = " primary" id = " toggler" style = { { marginBottomBag For Messenger Zipper Retro For Bag Leather Handbag Girl NXDA Women Shoulder Women Crossbody Bag Gray Brown : '1rem' } } >
Toggle
Button>
< UncontrolledCollapse toggler = " #toggler" >
< Card>
Leather Girl Handbag Bag Brown Bag Crossbody For Gray Messenger Zipper NXDA Retro For Women Women Shoulder Bag < CardBody>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Nesciunt magni, voluptas debitis
similique porro a molestias consequuntur earum odio officiis natus, amet hic, iste sed
dignissimos esse fuga! Minus, alias.
CardBody>
Card>
UncontrolledCollapse>
div>
) ;
export default Example;