Skip to content
Open
Changes from 1 commit
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
Next Next commit
added dividers between languages
  • Loading branch information
nrakhay committed Mar 21, 2024
commit 2d3d1cbc99ab3a72daff67bce9a094c533fef1f5
35 changes: 20 additions & 15 deletions src/components/translator/LanguageSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,23 +211,28 @@ const LangsDropdown = ({
const [code, name] = langs[j];
const valid = !validLang || validLang(code);
langElems.push(
<button
className={classNames('language-name', {
'variant-language-name': isVariant(code),
'text-muted': !valid,
})}
disabled={!valid}
key={code}
onClick={() => {
setLang(code);
document.body.click();
}}
tabIndex={0}
>
{name}
</button>,
<div>
<button
className={classNames('language-name', {
'variant-language-name': isVariant(code),
'text-muted': !valid,
})}
disabled={!valid}
key={code}
onClick={() => {
setLang(code);
document.body.click();
}}
tabIndex={0}
>
{name}
</button>

<div style={{ height: '0.5px', backgroundColor: 'gray', opacity: '30%' }} />
</div>,
);
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did this change?

langCols.push(
<div className="language-name-col" key={i} style={{ width: `${100.0 / numCols}%` }}>
{langElems}
Expand Down