style: improve layout and responsiveness of custom toolbar

This commit is contained in:
micha 2025-06-27 10:06:57 +02:00
parent 72c3f6c17f
commit 6c734f2d19
3 changed files with 26 additions and 13 deletions

View file

@ -7,11 +7,13 @@ export default function Home() {
const { data } = useGetApiUserMe(); const { data } = useGetApiUserMe();
return ( return (
<div className='max-h-full'> <div className='max-h-full flex justify-center items-center'>
<div className='w-full sm:w-[90%]'>
<Calendar <Calendar
userId={data?.data.user?.id} userId={data?.data.user?.id}
height='calc(100svh - 50px - (var(--spacing) * 2 * 5))' height='calc(100svh - 50px - (var(--spacing) * 2 * 5))'
/> />
</div> </div>
</div>
); );
} }

View file

@ -1,10 +1,14 @@
/* Container der Toolbar */ /* Container der Toolbar */
.custom-toolbar { .custom-toolbar {
display: flex; display: flex;
flex-direction: column; gap: 8px;
gap: 12px;
padding: calc(var(--spacing) * 2); padding: calc(var(--spacing) * 2);
padding-left: calc(50px + var(--spacing)); padding-left: calc(50px + var(--spacing));
@media (max-width: 870px) {
padding-left: 0;
flex-direction: column;
}
box-shadow: none; box-shadow: none;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
} }
@ -25,6 +29,7 @@
display: flex; display: flex;
gap: 8px; gap: 8px;
justify-content: center; justify-content: center;
align-items: center;
} }
.custom-toolbar .navigation-controls button { .custom-toolbar .navigation-controls button {
@ -77,6 +82,8 @@
border-radius: 11px; border-radius: 11px;
justify-items: center; justify-items: center;
align-items: center; align-items: center;
display: flex;
gap: 8px;
} }
.custom-toolbar .navigation-controls .handleWeek button { .custom-toolbar .navigation-controls .handleWeek button {
@ -93,6 +100,9 @@
padding: 0 8px; padding: 0 8px;
border-radius: 11px; border-radius: 11px;
justify-items: center; justify-items: center;
display: flex;
justify-content: center;
align-items: center;
} }
.right-section .datepicker-box { .right-section .datepicker-box {
@ -100,8 +110,12 @@
background-color: #c6c6c6; background-color: #c6c6c6;
height: 36px; height: 36px;
border-radius: 11px; border-radius: 11px;
font-size: 12px; font-size: 14px;
align-self: center; align-self: center;
font-family: 'Varela Round', sans-serif;
display: flex;
align-items: center;
justify-content: center;
} }
.datepicker { .datepicker {

View file

@ -171,12 +171,9 @@ const CustomToolbar: React.FC<CustomToolbarProps> = ({
}; };
return ( return (
<div <div className='custom-toolbar'>
className='custom-toolbar'
style={{ display: 'flex', flexDirection: 'initial', gap: '8px' }}
>
<div className='view-change'> <div className='view-change'>
<div className='view-switcher' style={{ display: 'flex', gap: '8px' }}> <div className='view-switcher'>
<Button <Button
//className='hover:bg-orange-600 hover:text-white' //className='hover:bg-orange-600 hover:text-white'
type='submit' type='submit'