@primer/components 0.0.0-202198182941 → 0.0.0-202198201647
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/CHANGELOG.md +1 -1
- package/dist/browser.esm.js.map +1 -1
- package/dist/browser.umd.js.map +1 -1
- package/lib/Token/TokenBase.d.ts +15 -1
- package/lib-esm/Token/TokenBase.d.ts +15 -1
- package/package.json +1 -1
package/lib/Token/TokenBase.d.ts
CHANGED
@@ -5,11 +5,25 @@ export declare const tokenSizes: Record<TokenSizeKeys, string>;
|
|
5
5
|
export declare const defaultTokenSize: TokenSizeKeys;
|
6
6
|
export interface TokenBaseProps extends Omit<React.HTMLProps<HTMLSpanElement | HTMLButtonElement | HTMLAnchorElement>, 'size' | 'id'> {
|
7
7
|
as?: 'button' | 'a' | 'span';
|
8
|
+
/**
|
9
|
+
* The function that gets called when a user clicks the remove button, or keys "Backspace" or "Delete" when focused on the token
|
10
|
+
*/
|
8
11
|
onRemove?: () => void;
|
12
|
+
/**
|
13
|
+
* Whether the token is selected
|
14
|
+
*/
|
9
15
|
isSelected?: boolean;
|
10
|
-
|
16
|
+
/**
|
17
|
+
* The text label inside the token
|
18
|
+
*/
|
11
19
|
text: string;
|
20
|
+
/**
|
21
|
+
* A unique identifier that can be associated with the token
|
22
|
+
*/
|
12
23
|
id?: number | string;
|
24
|
+
/**
|
25
|
+
* Which size the token will be rendered at
|
26
|
+
*/
|
13
27
|
size?: TokenSizeKeys;
|
14
28
|
}
|
15
29
|
export declare const isTokenInteractive: ({ as, onClick, onFocus, tabIndex }: TokenBaseProps) => boolean;
|
@@ -5,11 +5,25 @@ export declare const tokenSizes: Record<TokenSizeKeys, string>;
|
|
5
5
|
export declare const defaultTokenSize: TokenSizeKeys;
|
6
6
|
export interface TokenBaseProps extends Omit<React.HTMLProps<HTMLSpanElement | HTMLButtonElement | HTMLAnchorElement>, 'size' | 'id'> {
|
7
7
|
as?: 'button' | 'a' | 'span';
|
8
|
+
/**
|
9
|
+
* The function that gets called when a user clicks the remove button, or keys "Backspace" or "Delete" when focused on the token
|
10
|
+
*/
|
8
11
|
onRemove?: () => void;
|
12
|
+
/**
|
13
|
+
* Whether the token is selected
|
14
|
+
*/
|
9
15
|
isSelected?: boolean;
|
10
|
-
|
16
|
+
/**
|
17
|
+
* The text label inside the token
|
18
|
+
*/
|
11
19
|
text: string;
|
20
|
+
/**
|
21
|
+
* A unique identifier that can be associated with the token
|
22
|
+
*/
|
12
23
|
id?: number | string;
|
24
|
+
/**
|
25
|
+
* Which size the token will be rendered at
|
26
|
+
*/
|
13
27
|
size?: TokenSizeKeys;
|
14
28
|
}
|
15
29
|
export declare const isTokenInteractive: ({ as, onClick, onFocus, tabIndex }: TokenBaseProps) => boolean;
|