Skip to content

Commit 6ceb4bf

Browse files
authored
Merge pull request #1088 from vr-varad/fix/catalog_btns
Fix: Update for Catalog Btns
2 parents e491bc3 + df607f2 commit 6ceb4bf

File tree

6 files changed

+46
-23
lines changed

6 files changed

+46
-23
lines changed

src/custom/CatalogFilterSection/CatalogFilterSidebar.tsx

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,10 @@ import { Box, Drawer, Typography } from '../../base';
55
import { CloseIcon } from '../../icons';
66
import { darkTeal } from '../../theme';
77
import { darkModalGradient, lightModalGradient } from '../../theme/colors/colors';
8+
import { CustomTooltip } from '../CustomTooltip';
89
import { CloseBtn } from '../Modal';
910
import CatalogFilterSidebarState from './CatalogFilterSidebarState';
10-
import {
11-
FilterButton,
12-
FilterDrawerDiv,
13-
FilterText,
14-
FiltersCardDiv,
15-
FiltersDrawerHeader
16-
} from './style';
11+
import { FilterButton, FilterDrawerDiv, FiltersCardDiv, FiltersDrawerHeader } from './style';
1712

1813
export interface FilterOption {
1914
value: string;
@@ -109,13 +104,14 @@ const CatalogFilterSidebar: React.FC<CatalogFilterSidebarProps> = ({
109104
/>
110105
</FiltersCardDiv>
111106
<FilterDrawerDiv>
112-
<FilterButton variant="contained" onClick={handleDrawerOpen}>
113-
<FilterAltIcon
114-
style={{ height: '28px', width: '28px' }}
115-
fill={theme.palette.text.default}
116-
/>
117-
<FilterText>Filters</FilterText>
118-
</FilterButton>
107+
<CustomTooltip title="Filters" placement="bottom">
108+
<FilterButton variant="contained" onClick={handleDrawerOpen}>
109+
<FilterAltIcon
110+
style={{ height: '28px', width: '28px' }}
111+
fill={theme.palette.text.default}
112+
/>
113+
</FilterButton>
114+
</CustomTooltip>
119115

120116
<Drawer
121117
anchor="bottom"

src/custom/PerformersSection/PerformersSection.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,13 @@ const PerformersSection: React.FC<PerformersSectionProps> = ({
270270
/>
271271
</Box>
272272
{onOpenLeaderboard && (
273-
<Button variant="contained" onClick={() => onOpenLeaderboard()}>
273+
<Button
274+
variant="contained"
275+
onClick={() => onOpenLeaderboard()}
276+
sx={{
277+
display: { xs: 'none', md: 'inline-flex' }
278+
}}
279+
>
274280
Open Leaderboard
275281
</Button>
276282
)}

src/custom/PerformersSection/PerformersToogleButton.tsx

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,26 @@ const PerformersSectionButton: React.FC<PerformersSectionButtonProps> = ({ open,
3535
);
3636
};
3737

38+
const OpenLeaderBoardButton: React.FC<PerformersSectionButtonProps> = ({ handleClick }) => {
39+
return (
40+
<CustomTooltip title={'Open Leaderboard'} placement="bottom">
41+
<span>
42+
<Button
43+
variant="contained"
44+
onClick={handleClick}
45+
sx={{
46+
height: '3.7rem',
47+
padding: '0.3rem',
48+
display: { xs: 'inline-flex', md: 'none' }
49+
}}
50+
>
51+
<TropyIcon style={{ height: '2rem', width: '2rem' }} />
52+
</Button>
53+
</span>
54+
</CustomTooltip>
55+
);
56+
};
57+
3858
export const StateCardSekeleton = () => {
3959
return (
4060
<CardSkeleton>
@@ -53,4 +73,4 @@ export const StateCardSekeleton = () => {
5373
</CardSkeleton>
5474
);
5575
};
56-
export default PerformersSectionButton;
76+
export { OpenLeaderBoardButton, PerformersSectionButton };

src/custom/PerformersSection/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import PerformersSection from './PerformersSection';
2-
import PerformersSectionButton from './PerformersToogleButton';
3-
export { PerformersSection, PerformersSectionButton };
2+
import { OpenLeaderBoardButton, PerformersSectionButton } from './PerformersToogleButton';
3+
export { OpenLeaderBoardButton, PerformersSection, PerformersSectionButton };

src/custom/StyledSearchBar/style.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,5 @@ export const StyledSearchInput = styled(OutlinedInput)(({ style, theme }) => ({
1717
export const InputAdornmentEnd = styled(InputAdornment)(({ theme }) => ({
1818
borderLeft: `1px solid ${theme.palette.background.tertiary}`,
1919
height: '30px',
20-
paddingLeft: '10px',
21-
'@media (max-width: 590px)': {
22-
paddingLeft: '0px'
23-
}
20+
paddingLeft: '10px'
2421
}));

src/custom/index.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,11 @@ export { LearningContent } from './LearningContent';
6060
export { NavigationNavbar } from './NavigationNavbar';
6161
export { Note } from './Note';
6262
export { Panel } from './Panel';
63-
export { PerformersSection, PerformersSectionButton } from './PerformersSection';
63+
export {
64+
OpenLeaderBoardButton,
65+
PerformersSection,
66+
PerformersSectionButton
67+
} from './PerformersSection';
6468
export { SetupPreReq } from './SetupPrerequisite';
6569
export { StyledChapter } from './StyledChapter';
6670
export { StyledSearchBar } from './StyledSearchBar';

0 commit comments

Comments
 (0)