Skip to content

Commit

Permalink
Merge pull request #87 from shreyas1434shinde/main
Browse files Browse the repository at this point in the history
Issue #PS-2322 fix: Workspace UI improvements and Fixes
  • Loading branch information
itsvick authored Nov 13, 2024
2 parents 2d0108a + 8032978 commit fc86a8c
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/components/CourseCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ const CourseCard: React.FC<ContentCardProps> = ({
display: "flex",
flexDirection: "column",
width: "250px",
borderRight: 'unset !important'
}}
>
<Box position="relative" onClick={onContentClick}>
Expand Down
4 changes: 3 additions & 1 deletion src/components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ interface LayoutProps {
const Layout: React.FC<LayoutProps> = ({ children, selectedKey, onSelect }) => {
return (
<Box display="flex" minHeight={"100vh"}>
<Sidebar selectedKey={selectedKey} onSelect={onSelect} />
<Box sx={{ height: '100vh', '@media (max-width: 900px)': { position: 'absolute' }, '@media (min-width: 900px)': { background: '#fff' } }}>
<Sidebar selectedKey={selectedKey} onSelect={onSelect} />
</Box>
<Box sx={{ flex: 1, background: 'rgb(243, 245, 248)' }}>{children}</Box>
</Box>
);
Expand Down
8 changes: 7 additions & 1 deletion src/components/PaginationComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,18 @@ const PaginationComponent: React.FC<PaginationComponentProps> = ({
onPageChange,
}) => {
return (
<Box display="flex" justifyContent="center" mt={2}>
<Box display="flex" className="pagination-bottom" justifyContent="end" mt={2}>
<Pagination
count={count}
page={page + 1}
color="primary"
onChange={onPageChange}
sx={{

"& .Mui-selected": {
backgroundColor: "#FDBE16 !important",
},
}}
/>
</Box>
);
Expand Down
9 changes: 6 additions & 3 deletions src/components/SideBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,15 @@ const Sidebar: React.FC<SidebarProps> = ({ selectedKey, onSelect }) => {
};

const drawerContent = (
<Box display={'inline-block'} margin={"1rem 0.5rem 0.5rem 0.5rem"} width={"100%"} height={"100%"} sx={{ fontSize: '14px' }}>
<img src={'/logo.png'} alt="logo" height={60} />
<Box display={'inline-block'} margin={"1rem 0.5rem 0.5rem 0.5rem"} width={"250px"} height={"100%"} sx={{ fontSize: '14px', }}>
<Box sx={{ display: 'flex', justifyContent: 'center', alignItems: 'center' }}>
<img src={'/logo.png'} alt="logo" height={60} />
</Box>
<Box
p={'2rem 2rem 2rem 0'}
display="flex"
alignItems="center"
justifyContent="space-between"
paddingTop={"1rem"}
>

<Box display="flex" alignItems="center">
Expand Down Expand Up @@ -119,6 +121,7 @@ const Sidebar: React.FC<SidebarProps> = ({ selectedKey, onSelect }) => {
? "var(--mui-palette-primary-main)"
: "transparent",
},
margin: selectedKey === item.key ? "10px 0" : "0",
}}
key={item?.key}
onClick={() => handleNavigation(item?.key)}
Expand Down
2 changes: 2 additions & 0 deletions src/components/WorkspaceText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const WorkspaceText: React.FC<any> = () => {
'@media (max-width: 768px)': {
flexDirection: 'column',
},
'@media (max-width: 900px)': { padding: '18px 24px' }
}} gap={2}>
<Typography
variant="h1"
Expand All @@ -18,6 +19,7 @@ const WorkspaceText: React.FC<any> = () => {
marginRight: "10px",
fontSize: "22px",
fontWeight: 400,
'@media (max-width: 900px)': { paddingLeft: '34px' }
}}
>
Workspace
Expand Down
1 change: 1 addition & 0 deletions src/pages/workspace/content/publish/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ const PublishPage = () => {
/>
)}
</Box>
</Box>
</Layout>
);
};
Expand Down
1 change: 1 addition & 0 deletions src/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ html,
body {
margin: 0;
padding: 0;
background: '#F3F5F8';
}

.drawer-select div div {
Expand Down

0 comments on commit fc86a8c

Please sign in to comment.