( styleField: StyleField<T> | undefined, args: T, )
| 166 | | ((arg: Omit<CallbackArg, "__runtime">) => ElementEsque<TRuntime>); |
| 167 | |
| 168 | export const styleFieldToClassName = <T extends MinCallbackArg>( |
| 169 | styleField: StyleField<T> | undefined, |
| 170 | args: T, |
| 171 | ) => { |
| 172 | if (typeof styleField === "string") return styleField; |
| 173 | if (typeof styleField === "function") { |
| 174 | const result = styleField(args); |
| 175 | |
| 176 | if (typeof result === "string") return result; |
| 177 | } |
| 178 | |
| 179 | return ""; |
| 180 | }; |
| 181 | |
| 182 | export const styleFieldToCssObject = <T extends MinCallbackArg>( |
| 183 | styleField: StyleField<T> | undefined, |
no outgoing calls
no test coverage detected