@@ -28,15 +28,22 @@ const DismissIcon = bundleIcon(DismissFilled, DismissRegular);
28
28
*/
29
29
export const useTag_unstable = ( props : TagProps , ref : React . Ref < HTMLElement > ) : TagState => {
30
30
const {
31
- checked = false ,
31
+ appearance = 'filled-lighter' ,
32
32
disabled = false ,
33
- dismissable = false ,
33
+ dismissible = false ,
34
34
shape = 'rounded' ,
35
35
size = 'medium' ,
36
- appearance = 'filled-lighter' ,
37
36
} = props ;
38
37
39
38
return {
39
+ appearance,
40
+ avatarShape : tagAvatarShapeMap [ shape ] ,
41
+ avatarSize : tagAvatarSizeMap [ size ] ,
42
+ disabled,
43
+ dismissible,
44
+ shape,
45
+ size,
46
+
40
47
components : {
41
48
root : 'div' ,
42
49
content : 'div' ,
@@ -46,27 +53,19 @@ export const useTag_unstable = (props: TagProps, ref: React.Ref<HTMLElement>): T
46
53
secondaryText : 'span' ,
47
54
dismissButton : 'button' ,
48
55
} ,
49
- checked,
50
- disabled,
51
- dismissable,
52
- shape,
53
- size,
54
- appearance,
56
+
55
57
root : getNativeElementProps ( 'div' , {
56
58
ref,
57
59
...props ,
58
60
} ) ,
59
- avatarSize : tagAvatarSizeMap [ size ] ,
60
- avatarShape : tagAvatarShapeMap [ shape ] ,
61
- media : resolveShorthand ( props . media ) ,
62
61
63
62
content : resolveShorthand ( props . content , { required : true } ) ,
63
+ media : resolveShorthand ( props . media ) ,
64
64
icon : resolveShorthand ( props . icon ) ,
65
65
primaryText : resolveShorthand ( props . primaryText , { required : true } ) ,
66
66
secondaryText : resolveShorthand ( props . secondaryText ) ,
67
-
68
67
dismissButton : useARIAButtonShorthand ( props . dismissButton , {
69
- required : props . dismissable ,
68
+ required : props . dismissible ,
70
69
defaultProps : {
71
70
disabled,
72
71
type : 'button' ,
0 commit comments