@dktunited-techoff/techoff-suite-ui 1.4.2 → 1.4.3
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/esm/components/TsButton/TsButton.d.ts +1 -1
- package/esm/components/TsButton/TsButton.js +2 -2
- package/esm/components/TsButton/TsButton.js.map +1 -1
- package/esm/components/TsButton/TsButton.types.d.ts +2 -2
- package/lib/components/TsButton/TsButton.d.ts +1 -1
- package/lib/components/TsButton/TsButton.js +2 -2
- package/lib/components/TsButton/TsButton.js.map +1 -1
- package/lib/components/TsButton/TsButton.types.d.ts +2 -2
- package/package.json +1 -1
- package/src/components/TsButton/TsButton.tsx +2 -2
- package/src/components/TsButton/TsButton.types.ts +3 -2
|
@@ -2,4 +2,4 @@ import * as React from 'react';
|
|
|
2
2
|
import { PropsWithChildren } from 'react';
|
|
3
3
|
import { TsButtonProps } from './TsButton.types';
|
|
4
4
|
import './TsButton.css';
|
|
5
|
-
export declare const TsButton: ({ children, icon, iconDirection, size, variant, block, rounded,
|
|
5
|
+
export declare const TsButton: ({ children, icon, iconDirection, size, variant, block, rounded, ...props }: PropsWithChildren<TsButtonProps>) => React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { TsIcon } from '../TsIcon/TsIcon';
|
|
3
3
|
import './TsButton.css';
|
|
4
|
-
export const TsButton = ({ children, icon, iconDirection = 'left', size = 'md', variant = 'primary', block, rounded,
|
|
4
|
+
export const TsButton = ({ children, icon, iconDirection = 'left', size = 'md', variant = 'primary', block, rounded, ...props }) => {
|
|
5
5
|
// #########
|
|
6
6
|
// Rendering
|
|
7
7
|
return (React.createElement("button", { className: `
|
|
@@ -9,7 +9,7 @@ export const TsButton = ({ children, icon, iconDirection = 'left', size = 'md',
|
|
|
9
9
|
${block ? 'ts-button--block' : ''}
|
|
10
10
|
${rounded ? 'ts-button--rounded' : ''}
|
|
11
11
|
${icon && !children ? 'ts-button--icon-only' : ''}
|
|
12
|
-
`,
|
|
12
|
+
`, ...props },
|
|
13
13
|
icon && iconDirection === 'left' && React.createElement(TsIcon, { name: icon, size: "16" }),
|
|
14
14
|
children && React.createElement("div", null, children),
|
|
15
15
|
icon && iconDirection === 'right' && React.createElement(TsIcon, { name: icon, size: "16" })));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TsButton.js","sourceRoot":"","sources":["../../../src/components/TsButton/TsButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,OAAO,gBAAgB,CAAC;AAExB,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EACvB,QAAQ,EACR,IAAI,EACJ,aAAa,GAAG,MAAM,EACtB,IAAI,GAAG,IAAI,EACX,OAAO,GAAG,SAAS,EACnB,KAAK,EACL,OAAO,EACP,
|
|
1
|
+
{"version":3,"file":"TsButton.js","sourceRoot":"","sources":["../../../src/components/TsButton/TsButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,OAAO,gBAAgB,CAAC;AAExB,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EACvB,QAAQ,EACR,IAAI,EACJ,aAAa,GAAG,MAAM,EACtB,IAAI,GAAG,IAAI,EACX,OAAO,GAAG,SAAS,EACnB,KAAK,EACL,OAAO,EACP,GAAG,KAAK,EACyB,EAAE,EAAE;IACrC,YAAY;IACZ,YAAY;IACZ,OAAO,CACL,gCACE,SAAS,EAAE;+BACc,IAAI,eAAe,OAAO;UAC/C,KAAK,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE;UAC/B,OAAO,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE;UACnC,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,EAAE;OAClD,KACG,KAAK;QAER,IAAI,IAAI,aAAa,KAAK,MAAM,IAAI,oBAAC,MAAM,IAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAC,IAAI,GAAG;QACpE,QAAQ,IAAI,iCAAM,QAAQ,CAAO;QACjC,IAAI,IAAI,aAAa,KAAK,OAAO,IAAI,oBAAC,MAAM,IAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAC,IAAI,GAAG,CAC/D,CACV,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes } from 'react';
|
|
1
2
|
export type TsButtonProps = {
|
|
2
3
|
icon?: string;
|
|
3
4
|
iconDirection?: 'left' | 'right';
|
|
@@ -5,5 +6,4 @@ export type TsButtonProps = {
|
|
|
5
6
|
variant?: 'primary' | 'secondary' | 'success' | 'ghost' | 'shadow';
|
|
6
7
|
block?: boolean;
|
|
7
8
|
rounded?: boolean;
|
|
8
|
-
|
|
9
|
-
};
|
|
9
|
+
} & ButtonHTMLAttributes<HTMLButtonElement>;
|
|
@@ -2,4 +2,4 @@ import * as React from 'react';
|
|
|
2
2
|
import { PropsWithChildren } from 'react';
|
|
3
3
|
import { TsButtonProps } from './TsButton.types';
|
|
4
4
|
import './TsButton.css';
|
|
5
|
-
export declare const TsButton: ({ children, icon, iconDirection, size, variant, block, rounded,
|
|
5
|
+
export declare const TsButton: ({ children, icon, iconDirection, size, variant, block, rounded, ...props }: PropsWithChildren<TsButtonProps>) => React.JSX.Element;
|
|
@@ -4,7 +4,7 @@ exports.TsButton = void 0;
|
|
|
4
4
|
const React = require("react");
|
|
5
5
|
const TsIcon_1 = require("../TsIcon/TsIcon");
|
|
6
6
|
require("./TsButton.css");
|
|
7
|
-
const TsButton = ({ children, icon, iconDirection = 'left', size = 'md', variant = 'primary', block, rounded,
|
|
7
|
+
const TsButton = ({ children, icon, iconDirection = 'left', size = 'md', variant = 'primary', block, rounded, ...props }) => {
|
|
8
8
|
// #########
|
|
9
9
|
// Rendering
|
|
10
10
|
return (React.createElement("button", { className: `
|
|
@@ -12,7 +12,7 @@ const TsButton = ({ children, icon, iconDirection = 'left', size = 'md', variant
|
|
|
12
12
|
${block ? 'ts-button--block' : ''}
|
|
13
13
|
${rounded ? 'ts-button--rounded' : ''}
|
|
14
14
|
${icon && !children ? 'ts-button--icon-only' : ''}
|
|
15
|
-
`,
|
|
15
|
+
`, ...props },
|
|
16
16
|
icon && iconDirection === 'left' && React.createElement(TsIcon_1.TsIcon, { name: icon, size: "16" }),
|
|
17
17
|
children && React.createElement("div", null, children),
|
|
18
18
|
icon && iconDirection === 'right' && React.createElement(TsIcon_1.TsIcon, { name: icon, size: "16" })));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TsButton.js","sourceRoot":"","sources":["../../../src/components/TsButton/TsButton.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAE/B,6CAA0C;AAE1C,0BAAwB;AAEjB,MAAM,QAAQ,GAAG,CAAC,EACvB,QAAQ,EACR,IAAI,EACJ,aAAa,GAAG,MAAM,EACtB,IAAI,GAAG,IAAI,EACX,OAAO,GAAG,SAAS,EACnB,KAAK,EACL,OAAO,EACP,
|
|
1
|
+
{"version":3,"file":"TsButton.js","sourceRoot":"","sources":["../../../src/components/TsButton/TsButton.tsx"],"names":[],"mappings":";;;AAAA,+BAA+B;AAE/B,6CAA0C;AAE1C,0BAAwB;AAEjB,MAAM,QAAQ,GAAG,CAAC,EACvB,QAAQ,EACR,IAAI,EACJ,aAAa,GAAG,MAAM,EACtB,IAAI,GAAG,IAAI,EACX,OAAO,GAAG,SAAS,EACnB,KAAK,EACL,OAAO,EACP,GAAG,KAAK,EACyB,EAAE,EAAE;IACrC,YAAY;IACZ,YAAY;IACZ,OAAO,CACL,gCACE,SAAS,EAAE;+BACc,IAAI,eAAe,OAAO;UAC/C,KAAK,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE;UAC/B,OAAO,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE;UACnC,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,EAAE;OAClD,KACG,KAAK;QAER,IAAI,IAAI,aAAa,KAAK,MAAM,IAAI,oBAAC,eAAM,IAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAC,IAAI,GAAG;QACpE,QAAQ,IAAI,iCAAM,QAAQ,CAAO;QACjC,IAAI,IAAI,aAAa,KAAK,OAAO,IAAI,oBAAC,eAAM,IAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAC,IAAI,GAAG,CAC/D,CACV,CAAC;AACJ,CAAC,CAAC;AA3BW,QAAA,QAAQ,YA2BnB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes } from 'react';
|
|
1
2
|
export type TsButtonProps = {
|
|
2
3
|
icon?: string;
|
|
3
4
|
iconDirection?: 'left' | 'right';
|
|
@@ -5,5 +6,4 @@ export type TsButtonProps = {
|
|
|
5
6
|
variant?: 'primary' | 'secondary' | 'success' | 'ghost' | 'shadow';
|
|
6
7
|
block?: boolean;
|
|
7
8
|
rounded?: boolean;
|
|
8
|
-
|
|
9
|
-
};
|
|
9
|
+
} & ButtonHTMLAttributes<HTMLButtonElement>;
|
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@ export const TsButton = ({
|
|
|
12
12
|
variant = 'primary',
|
|
13
13
|
block,
|
|
14
14
|
rounded,
|
|
15
|
-
|
|
15
|
+
...props
|
|
16
16
|
}: PropsWithChildren<TsButtonProps>) => {
|
|
17
17
|
// #########
|
|
18
18
|
// Rendering
|
|
@@ -24,7 +24,7 @@ export const TsButton = ({
|
|
|
24
24
|
${rounded ? 'ts-button--rounded' : ''}
|
|
25
25
|
${icon && !children ? 'ts-button--icon-only' : ''}
|
|
26
26
|
`}
|
|
27
|
-
|
|
27
|
+
{...props}
|
|
28
28
|
>
|
|
29
29
|
{icon && iconDirection === 'left' && <TsIcon name={icon} size="16" />}
|
|
30
30
|
{children && <div>{children}</div>}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes } from 'react';
|
|
2
|
+
|
|
1
3
|
export type TsButtonProps = {
|
|
2
4
|
icon?: string;
|
|
3
5
|
iconDirection?: 'left' | 'right';
|
|
@@ -5,5 +7,4 @@ export type TsButtonProps = {
|
|
|
5
7
|
variant?: 'primary' | 'secondary' | 'success' | 'ghost' | 'shadow';
|
|
6
8
|
block?: boolean;
|
|
7
9
|
rounded?: boolean;
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
+
} & ButtonHTMLAttributes<HTMLButtonElement>;
|