@kiwicom/orbit-components
Version:
Orbit-components is a React component library which provides developers with the easiest possible way of building Kiwi.com’s products.
31 lines (28 loc) • 1.34 kB
JavaScript
import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
import styled from "styled-components";
import * as React from "react";
import transition from "../../../utils/transition";
import { CardElement } from "../../../Card/helpers/mixins";
import defaultTheme from "../../../defaultTheme";
import { getBorder, getBorderRadius } from "../../../Card/helpers/borders";
var StyledAccordionWrapper = styled.div.withConfig({
displayName: "AccordionWrapper__StyledAccordionWrapper",
componentId: "sc-6enghv-0"
})(["", ";border:", ";border-radius:", ";transition:", ";margin:", " 0;"], CardElement, getBorder, getBorderRadius, transition(["margin"], "fast", "ease-in-out"), function (_ref) {
var theme = _ref.theme;
return theme.orbit.spaceXSmall;
});
StyledAccordionWrapper.defaultProps = {
theme: defaultTheme
};
var AccordionWrapper = function AccordionWrapper(_ref2) {
var dataTest = _ref2.dataTest,
initialExpanded = _ref2.initialExpanded,
props = _objectWithoutProperties(_ref2, ["dataTest", "initialExpanded"]);
return /*#__PURE__*/React.createElement(StyledAccordionWrapper, _extends({}, props, {
expanded: props.expanded || initialExpanded,
"data-test": dataTest
}));
};
export default AccordionWrapper;