UNPKG

baseui

Version:

A React Component library implementing the Base design language

35 lines (32 loc) 940 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.IconWrapper = void 0; var _styles = require("../styles"); var _input = require("../input"); /* Copyright (c) Uber Technologies, Inc. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. */ const IconWrapper = exports.IconWrapper = (0, _styles.styled)('div', props => { const { $size, $theme } = props; const margin = { [_input.SIZE.mini]: $theme.sizing.scale300, [_input.SIZE.compact]: $theme.sizing.scale500, [_input.SIZE.default]: $theme.sizing.scale600, [_input.SIZE.large]: $theme.sizing.scale700 }; return { [$theme.direction === 'rtl' ? 'marginRight' : 'marginLeft']: margin[$size], height: '100%', display: 'flex', alignItems: 'center' }; }); IconWrapper.displayName = "IconWrapper"; IconWrapper.displayName = 'IconWrapper';