fix: borderBottom on DownloadsTable

pull/26459/head^2
Nicolás Quiroz 2 years ago
parent af86168c2f
commit 527dad3635
  1. 3
      src/components/UI/DataTable.tsx
  2. 11
      src/components/UI/downloads/DownloadsTable.tsx
  3. 2
      src/pages/downloads.tsx

@ -31,7 +31,6 @@ export const DataTable: FC<Props> = ({ columnHeaders, data }) => {
css={{
'&::-webkit-scrollbar': {
borderTop: '2px solid var(--chakra-colors-primary)',
borderBottom: '2px solid var(--chakra-colors-primary)',
height: 18
},
'&::-webkit-scrollbar-thumb': {
@ -52,7 +51,7 @@ export const DataTable: FC<Props> = ({ columnHeaders, data }) => {
fontFamily='"JetBrains Mono", monospace'
fontWeight={700}
fontSize='md'
color='#868b87' //? Use theme color? Or add to theme?
color='#868b87' // TODO: Use theme color? Or add to theme?
>
{columnHeader}
</Text>

@ -12,6 +12,7 @@ interface Props {
windowsData: ReleaseData[];
iOSData: ReleaseData[];
androidData: ReleaseData[];
totalReleasesNumber: number;
amountOfReleasesToShow: number;
setTotalReleases: (idx: number) => void;
}
@ -22,6 +23,7 @@ export const DownloadsTable: FC<Props> = ({
windowsData,
iOSData,
androidData,
totalReleasesNumber,
amountOfReleasesToShow,
setTotalReleases
}) => {
@ -36,7 +38,14 @@ export const DownloadsTable: FC<Props> = ({
const LAST_2_LINUX_RELEASES = amountOfReleasesToShow + 12;
return (
<Stack sx={{ mt: '0 !important' }}>
<Stack
sx={{ mt: '0 !important' }}
borderBottom={
amountOfReleasesToShow < totalReleasesNumber
? '2px solid var(--chakra-colors-primary)'
: 'none'
}
>
<Tabs variant='unstyled' onChange={idx => setTotalReleases(totalReleases[idx])}>
<TabList color='primary' bg='button-bg'>
{DOWNLOADS_TABLE_TABS.map((tab, idx) => {

@ -368,6 +368,7 @@ const DownloadsPage: NextPage<Props> = ({ data }) => {
windowsData={ALL_WINDOWS_STABLE_RELEASES}
iOSData={ALL_IOS_STABLE_RELEASES}
androidData={ALL_ANDROID_STABLE_RELEASES}
totalReleasesNumber={totalStableReleases}
amountOfReleasesToShow={amountStableReleases}
setTotalReleases={setTotalStableReleases}
/>
@ -423,6 +424,7 @@ const DownloadsPage: NextPage<Props> = ({ data }) => {
windowsData={ALL_WINDOWS_DEV_BUILDS}
iOSData={ALL_IOS_DEV_BUILDS}
androidData={ALL_ANDROID_DEV_BUILDS}
totalReleasesNumber={totalDevBuilds}
amountOfReleasesToShow={amountDevBuilds}
setTotalReleases={setTotalDevBuilds}
/>

Loading…
Cancel
Save