@mailstep/design-system 0.6.86-beta-jja.11 → 0.6.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@ export declare const ListItemContent: import("styled-components").StyledComponen
|
|
|
6
6
|
export declare const ListItemIcon: import("styled-components").StyledComponent<"span", import("@xstyled/system").Theme, {}, never>;
|
|
7
7
|
type Item = {
|
|
8
8
|
value: string;
|
|
9
|
-
icon
|
|
9
|
+
icon?: string;
|
|
10
10
|
label: string;
|
|
11
11
|
};
|
|
12
12
|
type IconListProps = {
|
|
@@ -4,9 +4,9 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
4
4
|
};
|
|
5
5
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
6
|
import React from 'react';
|
|
7
|
+
import Icon from '../../../../Elements/Icon/Icon';
|
|
7
8
|
import styled from '@xstyled/styled-components';
|
|
8
9
|
import { th } from '@xstyled/system';
|
|
9
|
-
import Icon from '../../../../Elements/Icon/Icon';
|
|
10
10
|
export var List = styled.ul(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: white;\n box-shadow: dropShadow;\n border-radius: 10px;\n padding: 2;\n min-width: 130px;\n"], ["\n background-color: white;\n box-shadow: dropShadow;\n border-radius: 10px;\n padding: 2;\n min-width: 130px;\n"])));
|
|
11
11
|
export var ListItem = styled.li(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n border-bottom: 1px solid ", ";\n padding: 1 0;\n cursor: pointer;\n"], ["\n border-bottom: 1px solid ", ";\n padding: 1 0;\n cursor: pointer;\n"])), th('colors.bgLightGray1'));
|
|
12
12
|
export var ListItemContent = styled.span(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n padding: 8px 10px;\n border-radius: 6px;\n font-size: 14px;\n font-weight: 400;\n color: ", ";\n background-color: ", ";\n :hover {\n background-color: ", ";\n }\n"], ["\n display: flex;\n align-items: center;\n padding: 8px 10px;\n border-radius: 6px;\n font-size: 14px;\n font-weight: 400;\n color: ", ";\n background-color: ", ";\n :hover {\n background-color: ", ";\n }\n"])), function (_a) {
|
|
@@ -23,7 +23,7 @@ export var ListItemIcon = styled.span(templateObject_4 || (templateObject_4 = __
|
|
|
23
23
|
var IconList = function (_a) {
|
|
24
24
|
var list = _a.list, selected = _a.selected, onClick = _a.onClick;
|
|
25
25
|
var handleClick = React.useCallback(function (item) { return function () { return onClick(item); }; }, [onClick]);
|
|
26
|
-
return (_jsx(List, { className: "ignore-element-for-closing-hook", children: list.map(function (item) { return (_jsx(ListItem, { onClick: handleClick(item), children: _jsxs(ListItemContent, { selected: selected === item.value, children: [_jsx(ListItemIcon, { children: _jsx(Icon, { icon: item.icon, fill: "red1", size: "8px" }) }), item.label] }) }, item.value)); }) }));
|
|
26
|
+
return (_jsx(List, { className: "ignore-element-for-closing-hook", children: list.map(function (item) { return (_jsx(ListItem, { onClick: handleClick(item), children: _jsxs(ListItemContent, { selected: selected === item.value, children: [item.icon && (_jsx(ListItemIcon, { children: _jsx(Icon, { icon: item.icon, fill: "red1", size: "8px" }) })), item.label] }) }, item.value)); }) }));
|
|
27
27
|
};
|
|
28
28
|
export default IconList;
|
|
29
29
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|