Skip to content

Commit

Permalink
feat(Select): add title for option
Browse files Browse the repository at this point in the history
  • Loading branch information
u4aew committed Dec 15, 2024
1 parent 0fde785 commit 9a0b82c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/components/Select/components/SelectList/OptionWrap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,12 @@ type OptionWrapProps = {
};

const DefaultOption = ({option}: DefaultOptionProps) => {
const {content, children, disabled} = option;
return <span className={b('option-default-label', {disabled})}>{content || children}</span>;
const {content, children, disabled, title} = option;
return (
<span title={title} className={b('option-default-label', {disabled})}>
{content || children}
</span>
);
};

export const OptionWrap = (props: OptionWrapProps) => {
Expand All @@ -31,7 +35,6 @@ export const OptionWrap = (props: OptionWrapProps) => {

return (
<div
title={option.title}
data-qa={option.qa}
className={b('option', {colored: selected && !multiple, disabled: option.disabled})}
>
Expand Down

0 comments on commit 9a0b82c

Please sign in to comment.