@@ -19,7 +19,12 @@ import { numberToWord } from './numberToWord'
19
19
* <Label tag />
20
20
* <div class="ui tag label"></div>
21
21
*/
22
- export const useKeyOnly = ( val , key ) => val && key
22
+ export const getKeyOnly = ( val , key ) => val && key
23
+
24
+ /**
25
+ * @deprecated
26
+ */
27
+ export const useKeyOnly = getKeyOnly
23
28
24
29
/**
25
30
* Props that require both a key and value to create a className.
@@ -30,7 +35,12 @@ export const useKeyOnly = (val, key) => val && key
30
35
* <Label corner='left' />
31
36
* <div class="ui left corner label"></div>
32
37
*/
33
- export const useValueAndKey = ( val , key ) => val && val !== true && `${ val } ${ key } `
38
+ export const getValueAndKey = ( val , key ) => val && val !== true && `${ val } ${ key } `
39
+
40
+ /**
41
+ * @deprecated
42
+ */
43
+ export const useValueAndKey = getValueAndKey
34
44
35
45
/**
36
46
* Props whose key will be used in className, or value and key.
@@ -45,7 +55,12 @@ export const useValueAndKey = (val, key) => val && val !== true && `${val} ${key
45
55
* <Label pointing='left' />
46
56
* <div class="ui left pointing label"></div>
47
57
*/
48
- export const useKeyOrValueAndKey = ( val , key ) => val && ( val === true ? key : `${ val } ${ key } ` )
58
+ export const getKeyOrValueAndKey = ( val , key ) => val && ( val === true ? key : `${ val } ${ key } ` )
59
+
60
+ /**
61
+ * @deprecated
62
+ */
63
+ export const useKeyOrValueAndKey = getKeyOrValueAndKey
49
64
50
65
//
51
66
// Prop to className exceptions
@@ -63,7 +78,7 @@ export const useKeyOrValueAndKey = (val, key) => val && (val === true ? key : `$
63
78
* <div class="mobile only row"></div>
64
79
* <div class="mobile only tablet only row"></div>
65
80
*/
66
- export const useMultipleProp = ( val , key ) => {
81
+ export const getMultipleProp = ( val , key ) => {
67
82
if ( ! val || val === true ) return null
68
83
69
84
return val
@@ -74,6 +89,11 @@ export const useMultipleProp = (val, key) => {
74
89
. join ( ' ' )
75
90
}
76
91
92
+ /**
93
+ * @deprecated
94
+ */
95
+ export const useMultipleProp = getMultipleProp
96
+
77
97
/**
78
98
* The "textAlign" prop follows the useValueAndKey except when the value is "justified'.
79
99
* In this case, only the class "justified" is used, ignoring the "aligned" class.
@@ -87,8 +107,13 @@ export const useMultipleProp = (val, key) => {
87
107
* <Container textAlign='left' />
88
108
* <div class="ui left aligned container"></div>
89
109
*/
90
- export const useTextAlignProp = ( val ) =>
91
- val === 'justified' ? 'justified' : useValueAndKey ( val , 'aligned' )
110
+ export const getTextAlignProp = ( val ) =>
111
+ val === 'justified' ? 'justified' : getValueAndKey ( val , 'aligned' )
112
+
113
+ /**
114
+ * @deprecated
115
+ */
116
+ export const useTextAlignProp = getTextAlignProp
92
117
93
118
/**
94
119
* The "verticalAlign" prop follows the useValueAndKey.
@@ -99,7 +124,12 @@ export const useTextAlignProp = (val) =>
99
124
* <Grid verticalAlign='middle' />
100
125
* <div class="ui middle aligned grid"></div>
101
126
*/
102
- export const useVerticalAlignProp = ( val ) => useValueAndKey ( val , 'aligned' )
127
+ export const getVerticalAlignProp = ( val ) => getValueAndKey ( val , 'aligned' )
128
+
129
+ /**
130
+ * @deprecated
131
+ */
132
+ export const useVerticalAlignProp = getVerticalAlignProp
103
133
104
134
/**
105
135
* Create "X", "X wide" and "equal width" classNames.
@@ -122,7 +152,7 @@ export const useVerticalAlignProp = (val) => useValueAndKey(val, 'aligned')
122
152
* <Grid columns={4} />
123
153
* <div class="ui four column grid"></div>
124
154
*/
125
- export const useWidthProp = ( val , widthClass = '' , canEqual = false ) => {
155
+ export const getWidthProp = ( val , widthClass = '' , canEqual = false ) => {
126
156
if ( canEqual && val === 'equal' ) {
127
157
return 'equal width'
128
158
}
@@ -132,3 +162,8 @@ export const useWidthProp = (val, widthClass = '', canEqual = false) => {
132
162
}
133
163
return numberToWord ( val )
134
164
}
165
+
166
+ /**
167
+ * @deprecated
168
+ */
169
+ export const useWidthProp = getWidthProp
0 commit comments