-
Notifications
You must be signed in to change notification settings - Fork 0
/
Handy.ts
37 lines (34 loc) · 1.23 KB
/
Handy.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
import { assign } from "lodash"
import { CSSProperties } from "@material-ui/core/styles/withStyles"
export default () => {
// creates handy classes that are good to use
const noSelect: CSSProperties = {
userSelect: "none",
msUserSelect: "none",
KhtmlUserSelect: "none",
MozUserSelect: "none"
}
const pointer: CSSProperties = assign({}, noSelect, { cursor: "pointer !important" })
return {
noSelect,
pointer,
block: { display: "block !important" } as CSSProperties,
inlineBlock: { display: "inline-block !important" } as CSSProperties,
invisible: { visibility: "hidden", opacity: 0 } as CSSProperties,
noDisplay: { display: "none", opacity: 0 } as CSSProperties,
separatorX: {
height: "1px",
width: "100%",
flex: "0 0 1px",
background: "$color-text-hint"
} as CSSProperties,
separatorY: {
width: "1px",
flex: "0 0 1px",
alignSelf: "stretch",
background: "$color-text-hint"
} as CSSProperties,
overflowHidden: { overflow: "hidden" } as CSSProperties,
overflowAuto: { overflow: "auto" } as CSSProperties
}
}