UNPKG

@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.

34 lines (30 loc) 1.37 kB
import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; const _excluded = ["dataTest", "initialExpanded"]; 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"; const StyledAccordionWrapper = styled.div.withConfig({ displayName: "AccordionWrapper__StyledAccordionWrapper", componentId: "sc-1oniiye-0" })(["", ";border:", ";border-radius:", ";transition:", ";margin:", " 0;"], CardElement, getBorder, getBorderRadius, transition(["margin"], "fast", "ease-in-out"), ({ theme }) => theme.orbit.spaceXSmall); // $FlowFixMe: https://github.com/flow-typed/flow-typed/issues/3653#issuecomment-568539198 StyledAccordionWrapper.defaultProps = { theme: defaultTheme }; const AccordionWrapper = _ref => { let { dataTest, initialExpanded } = _ref, props = _objectWithoutProperties(_ref, _excluded); return /*#__PURE__*/React.createElement(StyledAccordionWrapper, _extends({}, props, { expanded: props.expanded || initialExpanded, "data-test": dataTest })); }; export default AccordionWrapper;