Skip to content

Commit

Permalink
fix: improve layout and accessibility in resources and layout components
Browse files Browse the repository at this point in the history
- Adjusted styles in the CommonLayout header to prevent horizontal overflow.
- Updated ScrollArea class in resources page for better responsiveness and layout consistency.
- Changed onClick to onPress for breadcrumb navigation to enhance accessibility.
  • Loading branch information
blinko-space committed Dec 20, 2024
1 parent 99003be commit 2bfb29c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/Layout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export const CommonLayout = observer(({
style={{ width: isPc ? `calc(100% - ${base.sideBarWidth}px)` : '100%' }}
className={`flex transition-all duration-300 overflow-y-hidden w-full flex-col gap-y-1 bg-sencondbackground`}>
{/* nav bar */}
<header className="relative flex md:h-16 md:min-h-16 h-14 min-h-14 items-center justify-between gap-2 rounded-medium px-2 md:px:4 pt-2 md:pb-2">
<header className="relative flex md:h-16 md:min-h-16 h-14 min-h-14 items-center justify-between gap-2 rounded-medium px-2 md:px:4 pt-2 md:pb-2 overflow-x-hidden">
<div className="hidden md:block absolute bottom-[20%] right-[5%] z-[0] h-[350px] w-[350px] overflow-hidden blur-3xl ">
<div className="w-full h-[100%] bg-[#9936e6] opacity-20"
style={{ "clipPath": "circle(50% at 50% 50%)" }} />
Expand Down
4 changes: 2 additions & 2 deletions src/pages/resources.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const Page = observer(() => {
<DragDropContext onDragEnd={resourceStore.handleDragEnd}>
<ScrollArea
onBottom={resourceStore.loadNextPage}
className="px-2 md:px-6 h-[calc(100vh_-_100px)] max-w-[1000px] mx-auto"
className="md:px-6 h-[calc(100%_-_5px)] md:h-[calc(100vh_-_100px)] px-2 md:max-w-[1000px] w-full overflow-x-hidden mx-auto"
>
<div className="flex items-center justify-between">
<div className="flex items-center gap-2">
Expand All @@ -69,7 +69,7 @@ const Page = observer(() => {
{folderBreadcrumbs.map((folder, index) => (
<BreadcrumbItem
key={folder}
onClick={() => {
onPress={() => {
if (index === 0) {
resourceStore.navigateBack(router);
} else {
Expand Down

0 comments on commit 2bfb29c

Please sign in to comment.