@arclux/arc-ui-preact 1.1.0 → 1.2.0
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/package.json +2 -2
- package/src/content/Tag.tsx +3 -2
- package/src/input/Button.tsx +4 -2
- package/src/input/Input.tsx +4 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arclux/arc-ui-preact",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Preact wrappers for ARC UI Web Components.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.ts",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"preact": ">=10.19.0"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@arclux/arc-ui": "1.
|
|
47
|
+
"@arclux/arc-ui": "1.2.0"
|
|
48
48
|
},
|
|
49
49
|
"license": "MIT",
|
|
50
50
|
"keywords": [
|
package/src/content/Tag.tsx
CHANGED
|
@@ -7,12 +7,13 @@ export interface TagProps {
|
|
|
7
7
|
variant?: 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
|
|
8
8
|
removable?: boolean;
|
|
9
9
|
disabled?: boolean;
|
|
10
|
+
color?: string;
|
|
10
11
|
children?: preact.ComponentChildren;
|
|
11
12
|
[key: string]: unknown;
|
|
12
13
|
}
|
|
13
14
|
|
|
14
|
-
export const Tag: FunctionComponent<TagProps> = ({ variant, removable, disabled, children, ...rest }) => (
|
|
15
|
-
<arc-tag variant={variant} removable={removable} disabled={disabled} {...rest}>
|
|
15
|
+
export const Tag: FunctionComponent<TagProps> = ({ variant, removable, disabled, color, children, ...rest }) => (
|
|
16
|
+
<arc-tag variant={variant} removable={removable} disabled={disabled} color={color} {...rest}>
|
|
16
17
|
{children}
|
|
17
18
|
</arc-tag>
|
|
18
19
|
);
|
package/src/input/Button.tsx
CHANGED
|
@@ -9,12 +9,14 @@ export interface ButtonProps {
|
|
|
9
9
|
href?: string;
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
type?: string;
|
|
12
|
+
_hasPrefix?: string;
|
|
13
|
+
_hasSuffix?: string;
|
|
12
14
|
children?: preact.ComponentChildren;
|
|
13
15
|
[key: string]: unknown;
|
|
14
16
|
}
|
|
15
17
|
|
|
16
|
-
export const Button: FunctionComponent<ButtonProps> = ({ variant, size, href, disabled, type, children, ...rest }) => (
|
|
17
|
-
<arc-button variant={variant} size={size} href={href} disabled={disabled} type={type} {...rest}>
|
|
18
|
+
export const Button: FunctionComponent<ButtonProps> = ({ variant, size, href, disabled, type, _hasPrefix, _hasSuffix, children, ...rest }) => (
|
|
19
|
+
<arc-button variant={variant} size={size} href={href} disabled={disabled} type={type} _hasPrefix={_hasPrefix} _hasSuffix={_hasSuffix} {...rest}>
|
|
18
20
|
{children}
|
|
19
21
|
</arc-button>
|
|
20
22
|
);
|
package/src/input/Input.tsx
CHANGED
|
@@ -13,12 +13,14 @@ export interface InputProps {
|
|
|
13
13
|
required?: boolean;
|
|
14
14
|
multiline?: boolean;
|
|
15
15
|
rows?: number;
|
|
16
|
+
_hasPrefix?: string;
|
|
17
|
+
_hasSuffix?: string;
|
|
16
18
|
children?: preact.ComponentChildren;
|
|
17
19
|
[key: string]: unknown;
|
|
18
20
|
}
|
|
19
21
|
|
|
20
|
-
export const Input: FunctionComponent<InputProps> = ({ type, name, label, placeholder, value, disabled, required, multiline, rows, children, ...rest }) => (
|
|
21
|
-
<arc-input type={type} name={name} label={label} placeholder={placeholder} value={value} disabled={disabled} required={required} multiline={multiline} rows={rows} {...rest}>
|
|
22
|
+
export const Input: FunctionComponent<InputProps> = ({ type, name, label, placeholder, value, disabled, required, multiline, rows, _hasPrefix, _hasSuffix, children, ...rest }) => (
|
|
23
|
+
<arc-input type={type} name={name} label={label} placeholder={placeholder} value={value} disabled={disabled} required={required} multiline={multiline} rows={rows} _hasPrefix={_hasPrefix} _hasSuffix={_hasSuffix} {...rest}>
|
|
22
24
|
{children}
|
|
23
25
|
</arc-input>
|
|
24
26
|
);
|