@synerise/ds-action-area 0.2.29 → 0.3.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,25 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.3.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-action-area@0.3.0...@synerise/ds-action-area@0.3.1) (2023-09-26)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-action-area
9
+
10
+
11
+
12
+
13
+
14
+ # [0.3.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-action-area@0.2.29...@synerise/ds-action-area@0.3.0) (2023-09-08)
15
+
16
+
17
+ ### Features
18
+
19
+ * **action-area:** extended button with props ([09e31f6](https://github.com/Synerise/synerise-design/commit/09e31f6bf443301f9b39578f3f314fea43c9cffe))
20
+
21
+
22
+
23
+
24
+
6
25
  ## [0.2.29](https://github.com/Synerise/synerise-design/compare/@synerise/ds-action-area@0.2.28...@synerise/ds-action-area@0.2.29) (2023-09-05)
7
26
 
8
27
  **Note:** Version bump only for package @synerise/ds-action-area
package/README.md CHANGED
@@ -29,7 +29,8 @@ import ActionArea from '@synerise/ds-action-area'
29
29
  | Property | Description | Type | Default |
30
30
  | --- | --- | --- | --- |
31
31
  | action | Function called when user clicks on ActionButton | `Function` | - |
32
- | actionLabel | Label of action button | `string`/ `React.ReactNode` | - |
33
- | description | Description of ActionArea | `string`/ `React.ReactNode` | - |
34
- | label | Label of ActionArea | `string`/ `React.ReactNode` | - |
32
+ | actionLabel | Label of action button | `React.ReactNode` | - |
33
+ | description | Description of ActionArea | `React.ReactNode` | - |
34
+ | label | Label of ActionArea | `React.ReactNode` | - |
35
+ | buttonProps | optional additional button props | see ds-button | - |
35
36
 
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ /// <reference types="react" />
2
2
  import { ActionAreaProps } from './ActionArea.types';
3
- declare const ActionArea: React.FC<ActionAreaProps>;
3
+ declare const ActionArea: ({ label, description, action, actionLabel, buttonProps }: ActionAreaProps) => JSX.Element;
4
4
  export default ActionArea;
@@ -1,3 +1,5 @@
1
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+
1
3
  import * as React from 'react';
2
4
  import Button from '@synerise/ds-button';
3
5
  import { Title, Description } from '@synerise/ds-typography';
@@ -7,15 +9,16 @@ var ActionArea = function ActionArea(_ref) {
7
9
  var label = _ref.label,
8
10
  description = _ref.description,
9
11
  action = _ref.action,
10
- actionLabel = _ref.actionLabel;
12
+ actionLabel = _ref.actionLabel,
13
+ buttonProps = _ref.buttonProps;
11
14
  return /*#__PURE__*/React.createElement(S.ActionAreaWrapper, {
12
15
  className: "ds-action-area"
13
16
  }, label && /*#__PURE__*/React.createElement(Title, {
14
17
  level: 6
15
- }, label), /*#__PURE__*/React.createElement(Description, null, description), /*#__PURE__*/React.createElement(Button, {
18
+ }, label), /*#__PURE__*/React.createElement(Description, null, description), /*#__PURE__*/React.createElement(Button, _extends({
16
19
  type: "primary",
17
20
  onClick: action
18
- }, actionLabel));
21
+ }, buttonProps), actionLabel));
19
22
  };
20
23
 
21
24
  export default ActionArea;
@@ -1,7 +1,9 @@
1
- import * as React from 'react';
1
+ import { ReactNode } from 'react';
2
+ import { ButtonProps } from '@synerise/ds-button';
2
3
  export declare type ActionAreaProps = {
3
- label?: string | React.ReactNode;
4
- description: string | React.ReactNode;
4
+ label?: ReactNode;
5
+ description: ReactNode;
5
6
  action: () => void;
6
- actionLabel: string | React.ReactNode;
7
+ actionLabel: ReactNode;
8
+ buttonProps?: Partial<ButtonProps>;
7
9
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-action-area",
3
- "version": "0.2.29",
3
+ "version": "0.3.1",
4
4
  "description": "ActionArea UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -32,8 +32,8 @@
32
32
  ],
33
33
  "types": "dist/index.d.ts",
34
34
  "dependencies": {
35
- "@synerise/ds-button": "^0.18.1",
36
- "@synerise/ds-typography": "^0.12.9"
35
+ "@synerise/ds-button": "^0.18.2",
36
+ "@synerise/ds-typography": "^0.13.0"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "@synerise/ds-core": "*",
@@ -41,9 +41,9 @@
41
41
  "styled-components": "5.0.1"
42
42
  },
43
43
  "devDependencies": {
44
- "@synerise/ds-utils": "^0.24.15",
44
+ "@synerise/ds-utils": "^0.24.16",
45
45
  "@testing-library/jest-dom": "5.1.1",
46
46
  "@testing-library/react": "10.0.1"
47
47
  },
48
- "gitHead": "a2b1a3a78d87edfdbe97ae2f66573f4736f30e8b"
48
+ "gitHead": "f1f520c4c5ef9f90bacb5d5e0b2e778ceb8fdf79"
49
49
  }