@councilbox/councilbox-ui 0.6.26 → 0.6.27

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.
@@ -16,7 +16,7 @@ a.noStyles:hover{
16
16
  `}</style>
17
17
 
18
18
 
19
- # Librería de componentes ui-councilbox v0.6.24
19
+ # Librería de componentes ui-councilbox v0.6.27
20
20
 
21
21
  <h2>Componentes:</h2>
22
22
  <div><a class='noStyles' href='/story/components-accordion--default'>Accordion</a></div>
@@ -24,6 +24,9 @@ a.noStyles:hover{
24
24
  <h2>v0.5.4</h2>
25
25
  <div>Fix zIndex label InputText y SelectInput</div>
26
26
  </div>
27
+ <h2>v0.6.27</h2>
28
+ <div>Add Icon en el Avatar</div>
29
+
27
30
  <h2>v0.6.26</h2>
28
31
  <div>fix ellipsis companyName en Header</div>
29
32
 
@@ -2,4 +2,8 @@
2
2
  display: flex;
3
3
  align-items: center;
4
4
  justify-content: center;
5
+ }
6
+
7
+ .cbx-avatar-icon {
8
+ font-size: 1.5rem;
5
9
  }
@@ -17,7 +17,7 @@ var _Typography = _interopRequireDefault(require("../Typography/Typography"));
17
17
 
18
18
  require("./Avatar.css");
19
19
 
20
- var _excluded = ["backgroundColor", "text", "src", "label", "colorText", "variantText", "fontWeightText", "textAlignText", "variantLabel", "colorLabel", "fontWeightLabel", "textAlignLabel", "sizeAvatar", "sizeText"];
20
+ var _excluded = ["backgroundColor", "text", "src", "label", "colorText", "variantText", "fontWeightText", "textAlignText", "variantLabel", "colorLabel", "fontWeightLabel", "textAlignLabel", "sizeAvatar", "sizeText", "icon"];
21
21
 
22
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
23
 
@@ -69,6 +69,7 @@ var Avatar = function Avatar(_ref) {
69
69
  textAlignLabel = _ref.textAlignLabel,
70
70
  sizeAvatar = _ref.sizeAvatar,
71
71
  sizeText = _ref.sizeText,
72
+ icon = _ref.icon,
72
73
  props = _objectWithoutProperties(_ref, _excluded);
73
74
 
74
75
  return /*#__PURE__*/_react.default.createElement("div", {
@@ -84,7 +85,9 @@ var Avatar = function Avatar(_ref) {
84
85
  width: 'var(--spacing40)',
85
86
  height: 'var(--spacing40)'
86
87
  }, stylesAvatar[sizeAvatar]))
87
- }, props), /*#__PURE__*/_react.default.createElement(_Typography.default, {
88
+ }, props), icon ? /*#__PURE__*/_react.default.createElement("div", {
89
+ className: "cbx-avatar-icon"
90
+ }, icon) : /*#__PURE__*/_react.default.createElement(_Typography.default, {
88
91
  variant: variantText || (!variantText && !!label ? 'XS' : 'M'),
89
92
  color: colorText || 'var(--gray4)',
90
93
  fontWeight: fontWeightText,
@@ -105,7 +108,8 @@ Avatar.displayName = "Avatar";
105
108
  Avatar.propTypes = {
106
109
  backgroundColor: _propTypes.default.string,
107
110
  text: _propTypes.default.string,
108
- src: _propTypes.default.string,
111
+ src: _propTypes.default.any,
112
+ icon: _propTypes.default.any,
109
113
  label: _propTypes.default.string,
110
114
  colorText: _propTypes.default.string,
111
115
  variantText: _propTypes.default.string,
@@ -122,6 +126,7 @@ Avatar.defaultProps = {
122
126
  backgroundColor: '',
123
127
  text: 'MW',
124
128
  src: null,
129
+ icon: null,
125
130
  label: '',
126
131
  colorText: '',
127
132
  variantText: '',
@@ -28,13 +28,18 @@ var DesignAvatar = function DesignAvatar() {
28
28
  marginRight: '3em'
29
29
  }
30
30
  }, /*#__PURE__*/_react.default.createElement(_Avatar.default, {
31
- src: /*#__PURE__*/_react.default.createElement("i", {
31
+ backgroundColor: 'var(--primary)',
32
+ icon: /*#__PURE__*/_react.default.createElement("i", {
32
33
  className: "ri-user-3-line"
33
34
  })
34
35
  })), /*#__PURE__*/_react.default.createElement("div", {
35
36
  style: {
36
37
  marginRight: '3em'
37
38
  }
39
+ }, /*#__PURE__*/_react.default.createElement(_Avatar.default, null)), /*#__PURE__*/_react.default.createElement("div", {
40
+ style: {
41
+ marginRight: '3em'
42
+ }
38
43
  }, /*#__PURE__*/_react.default.createElement(_Avatar.default, {
39
44
  src: _imgMan.default
40
45
  })), /*#__PURE__*/_react.default.createElement("div", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@councilbox/councilbox-ui",
3
- "version": "0.6.26",
3
+ "version": "0.6.27",
4
4
  "main": "dist/build-index.js",
5
5
  "files": [
6
6
  "dist",