We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
undefined
1 parent da560d5 commit 059fad5Copy full SHA for 059fad5
packages/react-styles/src/index.ts
@@ -2,7 +2,7 @@
2
*
3
* @param {any} args list of objects, string, or arrays to reduce
4
*/
5
-export function css(...args: any): string {
+export function css(...args: any): string | undefined {
6
// Adapted from https://github.com/JedWatson/classnames/blob/master/index.js
7
const classes = [] as string[];
8
const hasOwn = {}.hasOwnProperty;
@@ -26,5 +26,5 @@ export function css(...args: any): string {
26
}
27
});
28
29
- return classes.join(' ');
+ return classes.join(' ').trim() || undefined;
30
0 commit comments