@rocket.chat/fuselage 0.32.0-dev.176 → 0.32.0-dev.177

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.
@@ -1,10 +1,12 @@
1
1
  import type { ComponentProps, ReactNode } from 'react';
2
2
  import Box from '../Box';
3
+ import { Icon } from '../Icon';
3
4
  declare type CalloutProps = Omit<ComponentProps<typeof Box>, 'type' | 'name'> & {
4
5
  type?: 'info' | 'success' | 'warning' | 'danger';
5
6
  title?: ReactNode;
6
7
  children?: ReactNode;
8
+ icon?: ComponentProps<typeof Icon>['name'];
7
9
  };
8
- export declare const Callout: ({ children, title, type, ...props }: CalloutProps) => JSX.Element;
10
+ export declare const Callout: ({ type, title, children, icon, ...props }: CalloutProps) => JSX.Element;
9
11
  export {};
10
12
  //# sourceMappingURL=Callout.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Callout.d.ts","sourceRoot":"","sources":["../../../src/components/Callout/Callout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvD,OAAO,GAAG,MAAM,QAAQ,CAAC;AAGzB,aAAK,YAAY,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG;IACtE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;IACjD,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,OAAO,wCAAyC,YAAY,gBAqBxE,CAAC"}
1
+ {"version":3,"file":"Callout.d.ts","sourceRoot":"","sources":["../../../src/components/Callout/Callout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvD,OAAO,GAAG,MAAM,QAAQ,CAAC;AACzB,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,aAAK,YAAY,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG;IACtE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;IACjD,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,IAAI,CAAC,EAAE,cAAc,CAAC,OAAO,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC;CAC5C,CAAC;AAEF,eAAO,MAAM,OAAO,8CAMjB,YAAY,gBAqBd,CAAC"}
@@ -5864,14 +5864,14 @@ var __rest = (undefined && undefined.__rest) || function (s, e) {
5864
5864
 
5865
5865
 
5866
5866
  var Callout = function (_a) {
5867
- var children = _a.children, title = _a.title, type = _a.type, props = __rest(_a, ["children", "title", "type"]);
5868
- var iconName = (type === 'info' && 'info-circled') ||
5867
+ var type = _a.type, title = _a.title, children = _a.children, icon = _a.icon, props = __rest(_a, ["type", "title", "children", "icon"]);
5868
+ var defaultIcon = (type === 'info' && 'info-circled') ||
5869
5869
  (type === 'success' && 'checkmark-circled') ||
5870
5870
  (type === 'warning' && 'warning') ||
5871
5871
  (type === 'danger' && 'ban') ||
5872
5872
  'info-circled';
5873
5873
  return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_1__["default"], __assign({ is: 'section', "rcx-callout": true, "rcx-callout--type": type }, props),
5874
- react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Icon__WEBPACK_IMPORTED_MODULE_2__.Icon, { name: iconName, size: 'x20' }),
5874
+ react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Icon__WEBPACK_IMPORTED_MODULE_2__.Icon, { name: icon || defaultIcon, size: 'x20' }),
5875
5875
  react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_1__["default"], { "rcx-callout__wrapper": true },
5876
5876
  title && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_1__["default"], { is: 'h1', "rcx-callout__title": true }, title)),
5877
5877
  children && react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Box__WEBPACK_IMPORTED_MODULE_1__["default"], { "rcx-callout__children": true }, children))));