@bitrise/bitkit-v2 0.3.57 → 0.3.59

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,10 @@
1
+ import { ButtonProps } from '@chakra-ui/react';
2
+ import { ReactElement } from 'react';
3
+ export interface BitkitButtonProps extends Omit<ButtonProps, 'colorPalette' | 'disabled' | 'loading' | 'loadingText' | 'spinner' | 'spinnerPlacement'> {
4
+ children: string;
5
+ leftIcon?: ReactElement;
6
+ rightIcon?: ReactElement;
7
+ state?: 'disabled' | 'loading' | 'skeleton';
8
+ }
9
+ declare const BitkitButton: import('react').ForwardRefExoticComponent<BitkitButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
10
+ export default BitkitButton;
@@ -0,0 +1,15 @@
1
+ import { jsx as e, jsxs as d } from "react/jsx-runtime";
2
+ import { Skeleton as s, Button as p } from "@chakra-ui/react";
3
+ import { forwardRef as c, Fragment as m } from "react";
4
+ const f = c((r, n) => {
5
+ const { children: o, leftIcon: i, rightIcon: l, state: t, ...a } = r;
6
+ return /* @__PURE__ */ e(s, { asChild: !0, loading: t === "skeleton", children: /* @__PURE__ */ d(p, { disabled: t === "disabled", loading: t === "loading", ref: n, ...a, children: [
7
+ i,
8
+ /* @__PURE__ */ e(t === "skeleton" ? "span" : m, { children: o }),
9
+ l
10
+ ] }) });
11
+ });
12
+ f.displayName = "BitkitButton";
13
+ export {
14
+ f as default
15
+ };
@@ -1,3 +1,4 @@
1
+ export { default as BitkitButton, type BitkitButtonProps } from './BitkitButton/BitkitButton';
1
2
  export { default as BitkitField, type BitkitFieldProps } from './BitkitField/BitkitField';
2
3
  export { default as BitkitNumberInput, type BitkitNumberInputProps } from './BitkitNumberInput/BitkitNumberInput';
3
4
  export { default as BitkitTextField, type BitkitTextFieldProps } from './BitkitTextField/BitkitTextField';