How to use the reactstrap.Collapse function in reactstrap

To help you get started, we’ve selected a few reactstrap 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 italia / design-react-kit / dist / design-react-kit.cjs.js View on Github external
var icon = _ref.icon,
      className = _ref.className,
      attributes = _objectWithoutPropertiesLoose(_ref, ["icon", "className"]);

  var classes = classnames(className, {
    'btn-icon': icon
  });
  return React__default.createElement(reactstrap.Button, _extends({
    className: classes
  }, attributes));
};

Button.propTypes = propTypes$4;
Button.defaultProps = defaultProps$4;

var propTypes$5 = _extends({}, reactstrap.Collapse.propTypes, {
  // eslint-disable-line react/forbid-foreign-prop-types

  /** Indica se il componente Collapse è usato all'interno di un componente Header */
  header: PropTypes.bool,

  /** Indica se il menu HeaderNav sia aperto o meno. Usato unicamente nel caso della HeaderNav, ovvero con navbar e header entrambi true */
  inOpen: PropTypes.bool,

  /** Funzione chiamata su click di overlay dell'HeaderNav aperto. Usato unicamente nel caso della HeaderNav, ovvero con navbar e header entrambi true */
  onOverlayClick: PropTypes.func
});

var Collapse = function Collapse(_ref) {
  var header = _ref.header,
      className = _ref.className,
      navbar = _ref.navbar,
github dsuryd / dotNetify-Elements / DevApp / src / dotnetify-elements / bootstrap / structure / index.js View on Github external
import styled from 'styled-components';
import { Card as _Card, CardImage as _CardImage, CardHeader, CardBody, CardFooter } from './Card';
import { Cell as _Cell, CellHeader, CellBody } from './Cell';
import { Tab as _Tab, TabItem as _TabItem } from './Tab';
import { PlainText } from '../form/PlainText';

import { Card, CardImage } from '../../structure/Card';
import { Cell } from '../../structure/Cell';
import { Collapsible } from '../../structure/Collapsible';
import { Field } from '../../structure/Field';
import { Modal } from '../../structure/Modal';
import { Tab, TabItem } from '../../structure/Tab';

import * as rs from 'reactstrap';

Collapsible.componentTypes.CollapsePanel = rs.Collapse;
Field.componentTypes.PlainTextComponent = PlainText;
Tab.componentTypes.TabContainer = _Tab;
TabItem.componentTypes.TabItemComponent = _TabItem;

Object.assign(Card.componentTypes, {
   Container: _Card,
   ImageContainer: _CardImage,
   HeaderContainer: CardHeader,
   BodyContainer: CardBody,
   FooterContainer: CardFooter
});

Object.assign(Cell.componentTypes, {
   Container: _Cell,
   HeaderContainer: CellHeader,
   BodyContainer: CellBody
github jhipster / react-jhipster / lib / src / component / metrics / thread-item.js View on Github external
ThreadItem.prototype.render = function () {
        var threadDumpInfo = this.props.threadDumpInfo;
        return (React.createElement("div", null,
            React.createElement("a", { onClick: this.toggleStackTrace, style: { color: 'hotpink' } }, this.state.collapse ? React.createElement("span", null, "Hide StackTrace") : React.createElement("span", null, "Show StackTrace")),
            React.createElement(reactstrap_1.Collapse, { isOpen: this.state.collapse },
                React.createElement(reactstrap_1.Card, null,
                    React.createElement(reactstrap_1.CardBody, null,
                        React.createElement(reactstrap_1.Row, { className: "break", style: { overflowX: 'scroll' } },
                            Object.entries(threadDumpInfo.stackTrace).map(function (_a) {
                                var stK = _a[0], stV = _a[1];
                                return (React.createElement("samp", { key: "detail-" + stK },
                                    stV.className,
                                    ".",
                                    stV.methodName,
                                    React.createElement("code", null,
                                        "(",
                                        stV.fileName,
                                        ":",
                                        stV.lineNumber,
                                        ")")));
                            }),
github italia / design-react-kit / dist / design-react-kit.cjs.js View on Github external
}), "close")), children);
  }

  var classes = classnames(className, {
    'link-list-wrapper': header
  });
  return React__default.createElement(reactstrap.Collapse, _extends({
    className: classes
  }, attributes, {
    navbar: navbar,
    isOpen: isOpen
  }), children);
};

Collapse.propTypes = propTypes$5;
Collapse.defaultProps = reactstrap.Collapse.defaultProps;

var FormGroup =
/*#__PURE__*/
function (_Component) {
  _inheritsLoose(FormGroup, _Component);

  function FormGroup() {
    var _this;

    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }

    _this = _Component.call.apply(_Component, [this].concat(args)) || this;

    _defineProperty(_assertThisInitialized(_this), "state", {