1 | import * as React from 'react';
|
2 | import {StyletronComponent} from 'styletron-react';
|
3 | import {Override} from '../overrides';
|
4 |
|
5 | export interface KIND {
|
6 | custom: 'custom';
|
7 | neutral: 'neutral';
|
8 | primary: 'primary';
|
9 | accent: 'accent';
|
10 | positive: 'positive';
|
11 | warning: 'warning';
|
12 | negative: 'negative';
|
13 | white: 'white';
|
14 | black: 'black';
|
15 | blue: 'blue';
|
16 | red: 'red';
|
17 | orange: 'orange';
|
18 | yellow: 'yellow';
|
19 | green: 'green';
|
20 | purple: 'purple';
|
21 | brown: 'brown';
|
22 | }
|
23 |
|
24 | export interface VARIANT {
|
25 | solid: 'solid';
|
26 | light: 'light';
|
27 | outlined: 'outlined';
|
28 | }
|
29 |
|
30 | export interface SIZE {
|
31 | small: 'small';
|
32 | medium: 'medium';
|
33 | large: 'large';
|
34 | }
|
35 |
|
36 | export interface TagOverrides {
|
37 | Root?: Override<any>;
|
38 | Action?: Override<any>;
|
39 | ActionIcon?: Override<any>;
|
40 | Text?: Override<any>;
|
41 | }
|
42 |
|
43 | export interface TagProps {
|
44 | overrides?: TagOverrides;
|
45 | closeable?: boolean;
|
46 | disabled?: boolean;
|
47 | isFocused?: boolean;
|
48 | isHovered?: boolean;
|
49 | kind?: KIND[keyof KIND];
|
50 | variant?: VARIANT[keyof VARIANT];
|
51 | children?: React.ReactNode;
|
52 | title?: string;
|
53 | color?: string;
|
54 | size?: SIZE[keyof SIZE];
|
55 | onActionClick?: (e: Event, children?: React.ReactNode) => any;
|
56 | onActionKeyDown?: (e: Event, children?: React.ReactNode) => any;
|
57 | onClick?: (event: Event) => any;
|
58 | onKeyDown?: (event: Event) => any;
|
59 | }
|
60 |
|
61 | export class Tag extends React.Component<TagProps> {
|
62 | handleKeyDown(event: KeyboardEvent): void;
|
63 | handleActionKeyDown(event: KeyboardEvent): void;
|
64 | }
|
65 |
|
66 | export const StyledRoot: StyletronComponent<any>;
|
67 | export const StyledAction: StyletronComponent<any>;
|
68 | export const StyledActionIcon: StyletronComponent<any>;
|
69 | export const StyledText: StyletronComponent<any>;
|
70 |
|
71 | export const KIND: KIND;
|
72 | export const VARIANT: VARIANT;
|
73 | export const SIZE: SIZE;
|