venice-ui 2.0.3 → 2.0.4

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.
@@ -11,6 +11,6 @@ const Theme_1 = require("../../Theme");
11
11
  const Card = ({ children, title, actionLabel, theme = Theme_1.mainTheme, iconColor = theme.textColor, iconHoverColor = theme.action, handleClick, handleBack, height, options, shadow = true, headerDivader = false }) => {
12
12
  return (react_1.default.createElement(Card_styles_1.CardElement, { height: height, shadow: shadow },
13
13
  (title || actionLabel) && (react_1.default.createElement(ElementHeader_1.ElementHeader, { title: title, actionLabel: actionLabel, handleClick: handleClick, handleBack: handleBack, options: options, theme: theme, iconColor: iconColor, iconHoverColor: iconHoverColor, bottomDivader: headerDivader })),
14
- react_1.default.createElement(Card_styles_1.CardContent, null, children)));
14
+ react_1.default.createElement(Card_styles_1.CardContent, { soloMode: !title && !actionLabel }, children)));
15
15
  };
16
16
  exports.Card = Card;
@@ -22,5 +22,7 @@ exports.CardContent = styled_components_1.default.div `
22
22
  padding: ${Theme_1.Theme.padding.l};
23
23
  width: 100%;
24
24
  flex-direction: row;
25
-
25
+ ${(p) => !p.soloMode &&
26
+ `
27
+ padding-top:0px;`}
26
28
  `;
@@ -60,7 +60,9 @@ const Input = ({ label, labelPosition = 'top', value, type = 'text', name, disab
60
60
  }
61
61
  };
62
62
  const onKeyDown = (e) => {
63
+ console.log(e.key, handleSubmit);
63
64
  if (handleSubmit && e.key === 'Enter') {
65
+ console.log('sss');
64
66
  handleSubmit();
65
67
  }
66
68
  };
@@ -5,5 +5,5 @@ import { mainTheme } from '../../Theme';
5
5
  export const Card = ({ children, title, actionLabel, theme = mainTheme, iconColor = theme.textColor, iconHoverColor = theme.action, handleClick, handleBack, height, options, shadow = true, headerDivader = false }) => {
6
6
  return (React.createElement(CardElement, { height: height, shadow: shadow },
7
7
  (title || actionLabel) && (React.createElement(ElementHeader, { title: title, actionLabel: actionLabel, handleClick: handleClick, handleBack: handleBack, options: options, theme: theme, iconColor: iconColor, iconHoverColor: iconHoverColor, bottomDivader: headerDivader })),
8
- React.createElement(CardContent, null, children)));
8
+ React.createElement(CardContent, { soloMode: !title && !actionLabel }, children)));
9
9
  };
@@ -16,5 +16,7 @@ export const CardContent = styled.div `
16
16
  padding: ${Theme.padding.l};
17
17
  width: 100%;
18
18
  flex-direction: row;
19
-
19
+ ${(p) => !p.soloMode &&
20
+ `
21
+ padding-top:0px;`}
20
22
  `;
@@ -34,7 +34,9 @@ export const Input = ({ label, labelPosition = 'top', value, type = 'text', name
34
34
  }
35
35
  };
36
36
  const onKeyDown = (e) => {
37
+ console.log(e.key, handleSubmit);
37
38
  if (handleSubmit && e.key === 'Enter') {
39
+ console.log('sss');
38
40
  handleSubmit();
39
41
  }
40
42
  };
@@ -3,5 +3,8 @@ interface ICardElementProps {
3
3
  height?: string;
4
4
  }
5
5
  export declare const CardElement: import("styled-components").StyledComponent<"div", any, ICardElementProps, never>;
6
- export declare const CardContent: import("styled-components").StyledComponent<"div", any, {}, never>;
6
+ interface ICardContentStyles {
7
+ soloMode: boolean;
8
+ }
9
+ export declare const CardContent: import("styled-components").StyledComponent<"div", any, ICardContentStyles, never>;
7
10
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "venice-ui",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "description": "Component library",
5
5
  "main": "index.js",
6
6
  "module": "./dist/esm/index.js",