Skip to content

Commit

Permalink
DOP-4393: fix broken language selector (#1022)
Browse files Browse the repository at this point in the history
  • Loading branch information
anabellabuckvar committed Feb 23, 2024
1 parent 9685411 commit 0ad6e7c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion src/components/Select.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ const portalStyle = css`
position: relative;
`;

const iconStyling = css`
display: inline-block;
margin-right: ${theme.size.small};
max-height: 20px;
width: 30px;
`;

/* Override LG mobile style of enlarged mobile font */
const selectStyle = css`
@media ${theme.screenSize.upToLarge} {
Expand Down Expand Up @@ -83,10 +90,11 @@ const Select = ({
<Option
className={cx(optionStyling)}
key={choice.value}
glyph={choice.icon}
value={choice.value}
glyph={choice.icon}
role="option"
>
{choice.tabSelectorIcon && <choice.tabSelectorIcon className={cx(iconStyling)} />}
{choice.text}
</Option>
))}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Tabs/TabSelectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const makeChoices = ({ name, iconMapping, options }) =>
Object.entries(options).map(([tabId, title]) => ({
text: getPlaintext(title),
value: tabId,
...(name === 'drivers' && { icon: iconMapping[tabId] }),
...(name === 'drivers' && { tabSelectorIcon: iconMapping[tabId] }),
}));

const TabSelector = ({ activeTab, handleClick, iconMapping, name, options }) => {
Expand Down

0 comments on commit 0ad6e7c

Please sign in to comment.