-
-
Notifications
You must be signed in to change notification settings - Fork 50
/
Copy pathinputClasses.ts
46 lines (41 loc) · 1.69 KB
/
inputClasses.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import inputBaseClasses from "../InputBase/inputBaseClasses";
import { generateUtilityClasses, generateUtilityClass } from "@suid/base";
export interface InputClasses {
/** Styles applied to the root element. */
root: string;
/** Styles applied to the root element if the component is a descendant of `FormControl`. */
formControl: string;
/** Styles applied to the root element if the component is focused. */
focused: string;
/** Styles applied to the root element if `disabled={true}`. */
disabled: string;
/** Styles applied to the root element if color secondary. */
colorSecondary: string;
/** Styles applied to the root element unless `disableUnderline={true}`. */
underline: string;
/** State class applied to the root element if `error={true}`. */
error: string;
/** Styles applied to the input element if `size="small"`. */
sizeSmall: string;
/** Styles applied to the root element if `multiline={true}`. */
multiline: string;
/** Styles applied to the root element if `fullWidth={true}`. */
fullWidth: string;
/** Styles applied to the input element. */
input: string;
/** Styles applied to the input element if `size="small"`. */
inputSizeSmall: string;
/** Styles applied to the input element if `multiline={true}`. */
inputMultiline: string;
/** Styles applied to the input element if `type="search"`. */
inputTypeSearch: string;
}
export type InputClassKey = keyof InputClasses;
export function getInputUtilityClass(slot: string): string {
return generateUtilityClass("MuiInput", slot);
}
const inputClasses: InputClasses = {
...inputBaseClasses,
...generateUtilityClasses("MuiInput", ["root", "underline", "input"]),
};
export default inputClasses;