Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ exports[`Matches the snapshot with both title and toolbar 1`] = `
Title
</div>
</div>
<div
class=""
>
<div>
<div>
Toolbar
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ exports[`Matches snapshot with icon 1`] = `

exports[`Matches snapshot without icon 1`] = `
<DocumentFragment>
<li
class=""
>
<li>
<span>
List item content
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1017,7 +1017,6 @@ exports[`Nav Nav List with flyout 1`] = `
</li>
</ul>
<div
class=""
data-popper-escaped="true"
data-popper-placement="right-start"
data-popper-reference-hidden="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

exports[`SearchInput advanced search 1`] = `
<DocumentFragment>
<div
class=""
>
<div>
<div
class="pf-v6-c-input-group"
>
Expand Down Expand Up @@ -145,7 +143,6 @@ exports[`SearchInput advanced search 1`] = `
exports[`SearchInput advanced search with custom attributes 1`] = `
<DocumentFragment>
<div
class=""
data-testid="test-id"
>
<div
Expand Down Expand Up @@ -282,7 +279,6 @@ exports[`SearchInput advanced search with custom attributes 1`] = `
</div>
</div>
<div
class=""
data-popper-escaped="true"
data-popper-placement="bottom-start"
data-popper-reference-hidden="true"
Expand Down Expand Up @@ -478,9 +474,7 @@ exports[`SearchInput advanced search with custom attributes 1`] = `

exports[`SearchInput renders search input in strict mode 1`] = `
<DocumentFragment>
<div
class=""
>
<div>
<div
class="pf-v6-c-input-group"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

exports[`empty 1`] = `
<DocumentFragment>
<span
class=""
/>
<span />
</DocumentFragment>
`;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ exports[`Flex Nested flex 1`] = `
<div
class="pf-v6-l-flex"
>
<div
class=""
>
<div>
Test
</div>
</div>
Expand All @@ -23,9 +21,7 @@ exports[`Flex Simple flex with single item 1`] = `
<div
class="pf-v6-l-flex"
>
<div
class=""
>
<div>
Test
</div>
</div>
Expand All @@ -37,9 +33,7 @@ exports[`Flex alternative component 1`] = `
<ul
class="pf-v6-l-flex"
>
<li
class=""
>
<li>
Test
</li>
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ exports[`renders some divs 1`] = `
class="pf-c-droppable pf-m-dragging"
>
<div>
<div
class=""
>
<div>
<button
aria-describedby="DndDescribedBy-0"
aria-disabled="false"
Expand Down Expand Up @@ -46,9 +44,7 @@ exports[`renders some divs 1`] = `
</button>
one
</div>
<div
class=""
>
<div>
<button
aria-describedby="DndDescribedBy-0"
aria-disabled="false"
Expand Down Expand Up @@ -86,9 +82,7 @@ exports[`renders some divs 1`] = `
</button>
two
</div>
<div
class=""
>
<div>
<button
aria-describedby="DndDescribedBy-0"
aria-disabled="false"
Expand Down
6 changes: 3 additions & 3 deletions packages/react-styles/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
*
* @param {any} args list of objects, string, or arrays to reduce
*/
export function css(...args: any): string {
// Adapted from https://github.com/JedWatson/classnames/blob/master/index.js
export function css(...args: any): string | undefined {
// Adapted from https://github.com/JedWatson/classnames/blob/main/index.js
const classes = [] as string[];
const hasOwn = {}.hasOwnProperty;

Expand All @@ -26,5 +26,5 @@ export function css(...args: any): string {
}
});

return classes.join(' ');
return classes.join(' ') || undefined;
}
Loading