Skip to content

Commit

Permalink
Restyled by prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits committed Sep 29, 2021
1 parent f45ef20 commit 4516f67
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 37 deletions.
3 changes: 2 additions & 1 deletion content/docs/command-reference/exp/show.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ metric or param.
- `--show-json` - prints the command's output in easily parsable JSON format,
instead of a human-readable table.

- `--show-csv` - prints the command's output in CSV format instead of a human-readable table.
- `--show-csv` - prints the command's output in CSV format instead of a
human-readable table.

- `--precision <n>` -
[round](https://docs.python.org/3/library/functions.html#round) decimal values
Expand Down
70 changes: 34 additions & 36 deletions src/components/DownloadButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,44 +78,42 @@ const getUserOS = (): OS => {
return OSName
}

const DownloadButtonDropdownItems: React.FC<IDownloadButtonDropdownItemsProps> = ({
onClick,
userOS
}) => {
return (
<div className={styles.links}>
{dropdownItems.map((os, index) => {
if (os === null) {
const DownloadButtonDropdownItems: React.FC<IDownloadButtonDropdownItemsProps> =
({ onClick, userOS }) => {
return (
<div className={styles.links}>
{dropdownItems.map((os, index) => {
if (os === null) {
return (
<div
className={styles.dropdownDelimiter}
key={`delimiter-${index}`}
/>
)
}

const item = itemsByOs[os]

return (
<div
className={styles.dropdownDelimiter}
key={`delimiter-${index}`}
/>
<Link
download={item.download}
key={os}
className={cn(
styles.dropdownItem,
os === userOS && styles.active,
'link-with-focus'
)}
href={item.url}
optOutPreRedirect={true}
onClick={(): void => onClick(os)}
>
{item.title}
</Link>
)
}

const item = itemsByOs[os]

return (
<Link
download={item.download}
key={os}
className={cn(
styles.dropdownItem,
os === userOS && styles.active,
'link-with-focus'
)}
href={item.url}
optOutPreRedirect={true}
onClick={(): void => onClick(os)}
>
{item.title}
</Link>
)
})}
</div>
)
}
})}
</div>
)
}

const DownloadButton: React.FC<IDownloadButtonProps> = ({ openTop }) => {
const userOS = useRef(getUserOS())
Expand Down

0 comments on commit 4516f67

Please sign in to comment.