techsbcn-storybook 0.22.7 → 0.23.1

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.
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import './CardComponent.scss';
3
+ declare type BackgroundType = 'gradiant-green' | 'gradiant-violet' | 'main-background-color' | 'white' | 'grey';
4
+ interface CardComponentProps {
5
+ children?: React.ReactNode;
6
+ height?: string;
7
+ backgroundType?: BackgroundType;
8
+ className?: string;
9
+ loading?: boolean;
10
+ onClick?: () => void;
11
+ }
12
+ export declare const CardComponent: React.FC<CardComponentProps>;
13
+ export {};
package/dist/index.d.ts CHANGED
@@ -21,3 +21,4 @@ export * from './components/modals/ModalComponent';
21
21
  export * from './components/wrappers/TabsComponent/TabsComponent';
22
22
  export * from './components/wrappers/LinearProgressComponent/LinearProgressComponent';
23
23
  export * from './components/fields/DatePickerComponent/DatePickerComponent';
24
+ export * from './components/wrappers/CardComponent/CardComponent';
@@ -0,0 +1,4 @@
1
+ import { Meta, Story } from '@storybook/react';
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ export declare const CardComponentProps: Story<import("@storybook/react").Args>;
@@ -3231,9 +3231,37 @@ DatePickerComponent.defaultProps = {
3231
3231
  fullWidth: true
3232
3232
  };
3233
3233
 
3234
+ var css_248z$i = ".card-component {\n box-shadow: 0 1px 20px 0 rgba(69, 90, 100, 0.08);\n background-color: white;\n}\n.card-component.gradiant-green {\n background: linear-gradient(-135deg, #1de9b6, #1dc4e9);\n color: white;\n}\n.card-component.gradiant-violet {\n background: linear-gradient(-135deg, #899fd4, #a389d4);\n color: white;\n}\n.card-component.grey {\n background: #A9A9A9;\n color: white;\n}\n.card-component.main-background-color {\n color: white;\n}\n.card-component .MuiCircularProgress-root {\n color: white;\n}";
3235
+ styleInject(css_248z$i);
3236
+
3237
+ var CardComponent = function CardComponent(props) {
3238
+ var _props$className, _props$height;
3239
+
3240
+ return React__default.createElement(material.Box, {
3241
+ className: "card-component " + props.backgroundType + " " + ((_props$className = props.className) != null ? _props$className : ''),
3242
+ height: "" + ((_props$height = props.height) != null ? _props$height : '100%'),
3243
+ onClick: props.onClick
3244
+ }, React__default.createElement(material.Box, {
3245
+ p: 3.125,
3246
+ py: 3.75,
3247
+ height: '100%'
3248
+ }, props.loading ? React__default.createElement(material.Box, {
3249
+ display: "flex",
3250
+ justifyContent: "center",
3251
+ alignItems: "center",
3252
+ height: '100%'
3253
+ }, React__default.createElement(material.CircularProgress, {
3254
+ className: "" + (props.backgroundType === 'white' ? 'circular-progress-main-color' : '')
3255
+ })) : props.children && props.children));
3256
+ };
3257
+ CardComponent.defaultProps = {
3258
+ backgroundType: 'white'
3259
+ };
3260
+
3234
3261
  exports.AppHeader = AppHeader;
3235
3262
  exports.AppSidebar = AppSidebar;
3236
3263
  exports.ButtonComponent = ButtonComponent;
3264
+ exports.CardComponent = CardComponent;
3237
3265
  exports.ChangePasswordForm = ChangePasswordForm;
3238
3266
  exports.DatePickerComponent = DatePickerComponent;
3239
3267
  exports.DrawerSidebar = DrawerSidebar;