fix: borderBottom on DownloadsTable

This commit is contained in:
Nicolás Quiroz 2022-12-07 16:59:44 -03:00
parent af86168c2f
commit 527dad3635
3 changed files with 13 additions and 3 deletions

View File

@ -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>

View File

@ -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) => {

View File

@ -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}
/>