beem-component 2.0.5 → 2.0.7
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.
|
@@ -51,7 +51,13 @@ var BeemButtonIcon = _styledComponents.default.button.withConfig({
|
|
|
51
51
|
});
|
|
52
52
|
var BmIconWrapper = _styledComponents.default.div.withConfig({
|
|
53
53
|
displayName: "buttonIconsOnly__BmIconWrapper"
|
|
54
|
-
})(["padding:
|
|
54
|
+
})(["padding:", ";"], function (_ref3) {
|
|
55
|
+
var size = _ref3.size;
|
|
56
|
+
if (size === 'xxsmall') {
|
|
57
|
+
return '0rem !important';
|
|
58
|
+
}
|
|
59
|
+
return '0.5rem !important';
|
|
60
|
+
});
|
|
55
61
|
exports.BmIconWrapper = BmIconWrapper;
|
|
56
62
|
var BmBtnIcon = function BmBtnIcon(props) {
|
|
57
63
|
var variant = props.variant,
|
|
@@ -66,7 +72,9 @@ var BmBtnIcon = function BmBtnIcon(props) {
|
|
|
66
72
|
size: size,
|
|
67
73
|
variant: variant,
|
|
68
74
|
disabled: disabled
|
|
69
|
-
}, rest), icon && /*#__PURE__*/_react.default.createElement(BmIconWrapper,
|
|
75
|
+
}, rest), icon && /*#__PURE__*/_react.default.createElement(BmIconWrapper, {
|
|
76
|
+
size: size
|
|
77
|
+
}, /*#__PURE__*/_react.default.createElement(_iconStyles.BmButtonIcon, {
|
|
70
78
|
disabled: disabled,
|
|
71
79
|
icon: icon,
|
|
72
80
|
variant: variant,
|
package/package.json
CHANGED
package/src/App.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// * eslint-disable func-style *
|
|
2
2
|
/* eslint-disable jsx-a11y/media-has-caption */
|
|
3
3
|
import React, { useState } from 'react';
|
|
4
|
-
|
|
4
|
+
import AbcIcon from '@mui/icons-material/Abc';
|
|
5
5
|
// import CircleIcon from '@mui/icons-material/Circle';
|
|
6
6
|
|
|
7
7
|
import {
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
BmChatForm,
|
|
18
18
|
BmButton,
|
|
19
19
|
BmButtonDropDown,
|
|
20
|
+
BmBtnIcon,
|
|
20
21
|
} from './lib/components';
|
|
21
22
|
|
|
22
23
|
const Chat = () => {
|
|
@@ -357,6 +358,7 @@ const Chat = () => {
|
|
|
357
358
|
</BmButton>
|
|
358
359
|
<BmButton variant="success">Test</BmButton>
|
|
359
360
|
<BmButtonDropDown size="xsmall">Test</BmButtonDropDown>
|
|
361
|
+
<BmBtnIcon icon={<AbcIcon />} size="xsmall" />
|
|
360
362
|
</div>
|
|
361
363
|
</BmChat>
|
|
362
364
|
</>
|
|
@@ -53,7 +53,12 @@ const BeemButtonIcon = styled.button`
|
|
|
53
53
|
`;
|
|
54
54
|
|
|
55
55
|
export const BmIconWrapper = styled.div`
|
|
56
|
-
padding:
|
|
56
|
+
padding: ${({ size }) => {
|
|
57
|
+
if (size === 'xxsmall') {
|
|
58
|
+
return '0rem !important';
|
|
59
|
+
}
|
|
60
|
+
return '0.5rem !important';
|
|
61
|
+
}};
|
|
57
62
|
`;
|
|
58
63
|
|
|
59
64
|
export const BmBtnIcon = (props) => {
|
|
@@ -68,7 +73,7 @@ export const BmBtnIcon = (props) => {
|
|
|
68
73
|
{...rest}
|
|
69
74
|
>
|
|
70
75
|
{icon && (
|
|
71
|
-
<BmIconWrapper>
|
|
76
|
+
<BmIconWrapper size={size}>
|
|
72
77
|
<BmButtonIcon
|
|
73
78
|
disabled={disabled}
|
|
74
79
|
icon={icon}
|