Skip to content

Commit c8b5b35

Browse files
fix: fixed style for label and description (#3847)
* fixed style for label and description * refactor * refactor
1 parent 31dc201 commit c8b5b35

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.optionDescription {
2+
display: block;
3+
margin-top: var(--ds-size-1);
4+
color: var(--ds-color-neutral-text-subtle);
5+
}

src/layout/MultipleSelect/MultipleSelectComponent.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { useGetOptions } from 'src/features/options/useGetOptions';
1414
import { useSaveValueToGroup } from 'src/features/saveToGroup/useSaveToGroup';
1515
import { useIsValid } from 'src/features/validation/selectors/isValid';
1616
import { ComponentStructureWrapper } from 'src/layout/ComponentStructureWrapper';
17+
import classes from 'src/layout/MultipleSelect/MultipleSelectComponent.module.css';
1718
import utilClasses from 'src/styles/utils.module.css';
1819
import { useLabel } from 'src/utils/layout/useLabel';
1920
import { useItemWhenType } from 'src/utils/layout/useNodeItem';
@@ -164,7 +165,11 @@ export function MultipleSelectComponent({
164165
<span>
165166
<wbr />
166167
<Lang id={option.label} />
167-
{option.description && <Lang id={option.description} />}
168+
{option.description && (
169+
<span className={classes.optionDescription}>
170+
<Lang id={option.description} />
171+
</span>
172+
)}
168173
</span>
169174
</Suggestion.Option>
170175
))}

0 commit comments

Comments
 (0)