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
5 changes: 5 additions & 0 deletions src/layout/MultipleSelect/MultipleSelectComponent.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.optionDescription {
display: block;
margin-top: var(--ds-size-1);
color: var(--ds-color-neutral-text-subtle);
}
7 changes: 6 additions & 1 deletion src/layout/MultipleSelect/MultipleSelectComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { useGetOptions } from 'src/features/options/useGetOptions';
import { useSaveValueToGroup } from 'src/features/saveToGroup/useSaveToGroup';
import { useIsValid } from 'src/features/validation/selectors/isValid';
import { ComponentStructureWrapper } from 'src/layout/ComponentStructureWrapper';
import classes from 'src/layout/MultipleSelect/MultipleSelectComponent.module.css';
import utilClasses from 'src/styles/utils.module.css';
import { useLabel } from 'src/utils/layout/useLabel';
import { useItemWhenType } from 'src/utils/layout/useNodeItem';
Expand Down Expand Up @@ -164,7 +165,11 @@ export function MultipleSelectComponent({
<span>
<wbr />
<Lang id={option.label} />
{option.description && <Lang id={option.description} />}
{option.description && (
<span className={classes.optionDescription}>
<Lang id={option.description} />
</span>
)}
</span>
</Suggestion.Option>
))}
Expand Down