@atlaskit/icon
Version:
An icon is a symbol representing a command, device, directory, or common action.
78 lines (77 loc) • 2.29 kB
JavaScript
/* icon-tile-old.tsx generated by @compiled/babel-plugin v0.39.1 */
import "./icon-tile-old.compiled.css";
import * as React from 'react';
import { ax, ix } from "@compiled/react/runtime";
var sizeCrossCompatibleMap = {
// Size mapping from new t-shirt sizes to old pixel sizes
xsmall: '20',
small: '24',
medium: '32',
large: '40',
xlarge: '48',
'16': '16',
'24': '24',
'32': '32',
'40': '40',
'48': '48'
};
var sizeMap = {
'16': "_1bsb7vkz _4t3i7vkz",
'20': "_1bsbgktf _4t3igktf",
'24': "_1bsb1tcg _4t3i1tcg",
'32': "_1bsbzwfg _4t3izwfg",
'40': "_1bsb1ylp _4t3i1ylp",
'48': "_1bsbckbl _4t3ickbl"
};
var appearanceMap = {
grayBold: "_bfhk1i45 _syaz5w2r",
limeBold: "_bfhktde4 _syaz5w2r",
greenBold: "_bfhk1e5c _syaz5w2r",
blueBold: "_bfhk16e3 _syaz5w2r",
redBold: "_bfhkuibq _syaz5w2r",
purpleBold: "_bfhkya33 _syaz5w2r",
magentaBold: "_bfhkc3uk _syaz5w2r",
tealBold: "_bfhk2c8p _syaz5w2r",
orangeBold: "_bfhk1qg1 _syaz5w2r",
yellowBold: "_bfhk1vop _syaz5w2r",
gray: "_bfhk7qp0 _syaz1diz",
lime: "_bfhkz2ec _syaz8645",
orange: "_bfhk165s _syaz1j6y",
magenta: "_bfhkv9ra _syazv8hk",
green: "_bfhk1wnw _syaz17hp",
blue: "_bfhk1dy8 _syaz6txe",
red: "_bfhk1rtt _syaznbxb",
purple: "_bfhk1nm4 _syazuq3u",
teal: "_bfhk1a17 _syaz8uof",
yellow: "_bfhk1773 _syaz1oqg"
};
var shapeMap = {
square: "_2rko12b0",
circle: "_2rko1rr0"
};
var iconTileStyles = null;
/**
* __IconTile__
*
* An icon with background shape, color, and size properties determined by Tile.
*/
export default function IconTile(props) {
var Icon = props.icon,
label = props.label,
appearance = props.appearance,
_props$size = props.size,
size = _props$size === void 0 ? '24' : _props$size,
_props$shape = props.shape,
shape = _props$shape === void 0 ? 'square' : _props$shape,
testId = props.testId;
var ExpandedIcon = Icon;
return /*#__PURE__*/React.createElement("span", {
"data-testid": testId,
className: ax(["_1e0c116y _vchhusvi _4cvr1h6o _1bah1h6o _1wybidpf", appearanceMap[appearance], sizeMap[sizeCrossCompatibleMap[size]], shapeMap[shape]])
}, /*#__PURE__*/React.createElement(ExpandedIcon, {
color: "currentColor",
label: label,
spacing: "spacious",
shouldScale: true
}));
}