@spaced-out/ui-design-system 0.0.14 → 0.0.15

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
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.0.15](https://github.com/spaced-out/ui-design-system/compare/v0.0.14...v0.0.15) (2023-01-17)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * type prop conflict between button and icon ([#48](https://github.com/spaced-out/ui-design-system/issues/48)) ([726b747](https://github.com/spaced-out/ui-design-system/commit/726b747722751444b7eef76c29bf84f12f77f657))
11
+
5
12
  ### [0.0.14](https://github.com/spaced-out/ui-design-system/compare/v0.0.13...v0.0.14) (2023-01-17)
6
13
 
7
14
 
@@ -39,6 +39,7 @@ const UnstyledButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
39
39
  onClick,
40
40
  className,
41
41
  ariaLabel,
42
+ actionType,
42
43
  ...props
43
44
  } = _ref;
44
45
  return /*#__PURE__*/React.createElement("button", _extends({}, props, ariaLabel ? {
@@ -48,6 +49,7 @@ const UnstyledButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
48
49
  ref: ref,
49
50
  role: "button",
50
51
  disabled: disabled,
52
+ type: actionType,
51
53
  onClick: event => {
52
54
  if (disabled) {
53
55
  event.preventDefault();
@@ -74,7 +76,7 @@ const Button = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
74
76
  ...props
75
77
  } = _ref2;
76
78
  return /*#__PURE__*/React.createElement(UnstyledButton, _extends({}, props, {
77
- type: actionType,
79
+ actionType: actionType,
78
80
  className: (0, _classify.classify)(_ButtonModule.default.button, {
79
81
  [_ButtonModule.default.primary]: type === 'primary',
80
82
  [_ButtonModule.default.secondary]: type === 'secondary',
@@ -31,7 +31,7 @@ export type ButtonActionType = $Values<typeof BUTTON_ACTION_TYPE>;
31
31
  export type UnstyledButtonProps = {
32
32
  children?: React.Node,
33
33
  disabled?: mixed,
34
- type?: ButtonActionType,
34
+ actionType?: ButtonActionType,
35
35
  onClick?: ?(SyntheticEvent<HTMLElement>) => mixed,
36
36
  className?: string,
37
37
  ariaLabel?: string,
@@ -68,7 +68,14 @@ export const UnstyledButton: React$AbstractComponent<
68
68
  HTMLButtonElement,
69
69
  > = React.forwardRef<UnstyledButtonProps, HTMLButtonElement>(
70
70
  (
71
- {disabled, onClick, className, ariaLabel, ...props}: UnstyledButtonProps,
71
+ {
72
+ disabled,
73
+ onClick,
74
+ className,
75
+ ariaLabel,
76
+ actionType,
77
+ ...props
78
+ }: UnstyledButtonProps,
72
79
  ref: React.Ref<'button'>,
73
80
  ) => (
74
81
  <button
@@ -78,6 +85,7 @@ export const UnstyledButton: React$AbstractComponent<
78
85
  ref={ref}
79
86
  role="button"
80
87
  disabled={disabled}
88
+ type={actionType}
81
89
  onClick={(event) => {
82
90
  if (disabled) {
83
91
  event.preventDefault();
@@ -110,7 +118,7 @@ export const Button: React$AbstractComponent<ButtonProps, HTMLButtonElement> =
110
118
  ) => (
111
119
  <UnstyledButton
112
120
  {...props}
113
- type={actionType}
121
+ actionType={actionType}
114
122
  className={classify(
115
123
  css.button,
116
124
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spaced-out/ui-design-system",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "main": "index.js",
5
5
  "description": "Sense UI components library",
6
6
  "author": {