UNPKG

@atlaskit/toggle

Version:

A toggle is used to view or switch between enabled or disabled states.

31 lines 1.04 kB
/* icon-container.tsx generated by @compiled/babel-plugin v0.38.1 */ import "./icon-container.compiled.css"; import * as React from 'react'; import { ax, ix } from "@compiled/react/runtime"; import { cx } from '@atlaskit/css'; import { Box } from '@atlaskit/primitives/compiled'; const styles = { iconContainer: "_v5641hrg _1e0c116y _4cvr1h6o _1bah1h6o _kqswstnw _152tv77o", iconContainerRegular: "_1bsb7vkz _4t3i7vkz", iconContainerLarge: "_1bsbgktf _4t3igktf", hidden: "_tzy4idpf", left: "_1e021l7b", right: "_rjxp1l7b" }; /** * __Icon container__ * * Positions a toggle's check and close icons. */ const IconContainer = ({ children, size, isHidden, position }) => { return /*#__PURE__*/React.createElement(Box, { as: "span", xcss: cx(styles.iconContainer, isHidden && styles.hidden, size === 'regular' && styles.iconContainerRegular, size === 'large' && styles.iconContainerLarge, position === 'left' && styles.left, position === 'right' && styles.right) }, children); }; export default IconContainer;