@adamjanicki/ui 1.5.0 → 1.5.2

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.
@@ -36,6 +36,11 @@ type ButtonProps = DefaultButtonProps & {
36
36
  * @default "rounded"
37
37
  */
38
38
  corners?: CornerType;
39
+ /**
40
+ * [Optional] Size of the button, if wishing to make smaller
41
+ * @default "regular"
42
+ */
43
+ size?: "regular" | "small";
39
44
  };
40
45
  export declare const UnstyledButton: React.ForwardRefExoticComponent<Omit<DefaultButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
41
46
  export declare const IconButton: React.ForwardRefExoticComponent<Omit<IconButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
@@ -37,7 +37,7 @@ export var IconButton = forwardRef(function (_a, ref) {
37
37
  return (_jsx(UnstyledButton, __assign({}, props, { className: classNames("ajui-icon-button", className), ref: ref, children: icon })));
38
38
  });
39
39
  var Button = forwardRef(function (_a, ref) {
40
- var _b = _a.variant, variant = _b === void 0 ? "primary" : _b, _c = _a.corners, corners = _c === void 0 ? "rounded" : _c, className = _a.className, rest = __rest(_a, ["variant", "corners", "className"]);
41
- return (_jsx(UnstyledButton, __assign({}, rest, { className: classNames("ajui-button-default ajui-button--".concat(variant, " corners--").concat(corners), className), ref: ref })));
40
+ var _b = _a.variant, variant = _b === void 0 ? "primary" : _b, _c = _a.corners, corners = _c === void 0 ? "rounded" : _c, className = _a.className, _d = _a.size, size = _d === void 0 ? "regular" : _d, rest = __rest(_a, ["variant", "corners", "className", "size"]);
41
+ return (_jsx(UnstyledButton, __assign({}, rest, { className: classNames("ajui-button--".concat(variant, " ajui-button-size--").concat(size, " corners--").concat(corners), className), ref: ref })));
42
42
  });
43
43
  export default Button;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adamjanicki/ui",
3
- "version": "1.5.0",
3
+ "version": "1.5.2",
4
4
  "description": "Basic UI components and hooks for React in TypeScript",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
package/style.css CHANGED
@@ -204,10 +204,16 @@ a {
204
204
  font-weight: 500;
205
205
  }
206
206
 
207
- .ajui-button-default {
207
+ .ajui-button-size--regular {
208
208
  padding: 0.5rem 1rem;
209
209
  }
210
210
 
211
+ .ajui-button-size--small {
212
+ padding: 4px 6px;
213
+ font-size: 12px;
214
+ font-weight: 600;
215
+ }
216
+
211
217
  .ajui-icon-button {
212
218
  display: flex;
213
219
  justify-content: center;