Skip to content

Commit

Permalink
make no items text non mandatory
Browse files Browse the repository at this point in the history
  • Loading branch information
audisaudisaudis committed Oct 11, 2024
1 parent 86a1e4d commit e38e6d4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@ function ComboboxExternalItems({

return (
<VStack aria-live={ariaLive}>
{items.length === 0 ? (
{items.length === 0 && noItemsText && (
<BodyLong
weight={fontWeight}
size={fontSize}
className="combobox-external-items-leading-text mb-2"
>
{noItemsText}
</BodyLong>
) : (
)}
{items.length > 0 && (
<VStack>
<BodyLong
id={chipsLabelId}
Expand Down Expand Up @@ -80,7 +81,7 @@ ComboboxExternalItems.propTypes = {
])
),
itemsLeadingText: PropTypes.string.isRequired,
noItemsText: PropTypes.string.isRequired,
noItemsText: PropTypes.string,
removeComboboxItem: PropTypes.func.isRequired,
};

Expand Down
2 changes: 1 addition & 1 deletion src/packages/arbeidsplassen-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@navikt/arbeidsplassen-react",
"version": "8.3.5",
"version": "8.3.6",
"main": "dist/index.js",
"module": "dist/index.js",
"private": false,
Expand Down

0 comments on commit e38e6d4

Please sign in to comment.