Skip to content

Commit 9f5c8b5

Browse files
committed
fix: minor styling adjustments
1 parent 3731d4e commit 9f5c8b5

File tree

5 files changed

+33
-31
lines changed

5 files changed

+33
-31
lines changed

components/DateTimePicker.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ const DateTimePicker = forwardRef(({ className = '', inputClassName = '', error
2121
{
2222
'rounded-r-3xl': icon && iconPosition === 'left',
2323
'rounded-l-3xl': icon && iconPosition === 'right',
24-
'rounded-3xl': !icon
24+
'rounded-3xl': !icon,
25+
'px-4': !icon
2526
}
2627
)
2728

components/Input.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,17 @@ const Input = forwardRef((props, ref) => {
5454
text-gray-400
5555
duration-300
5656
transform
57-
-translate-y-3
57+
-translate-y-[calc(100%+0.35rem)]
5858
scale-75
59-
top-1/4
59+
top-1/2
6060
z-10
6161
origin-[0]
6262
start-2.5
6363
peer-focus:text-gray-500
6464
peer-placeholder-shown:scale-100
65-
peer-placeholder-shown:translate-y-0
65+
peer-placeholder-shown:-translate-y-1/2
6666
peer-focus:scale-75
67-
peer-focus:-translate-y-3
67+
peer-focus:-translate-y-[calc(100%+0.35rem)]
6868
rtl:peer-focus:translate-x-1/4
6969
rtl:peer-focus:left-auto
7070
${labelClassName}
@@ -110,7 +110,7 @@ const Input = forwardRef((props, ref) => {
110110
{...rest}
111111
/>
112112
{type === 'password' &&
113-
<span className='absolute right-5 top-4 text-gray-400 text-lg cursor-pointer' onClick={toggleShowInput}>
113+
<span className='absolute right-5 top-1/2 -translate-y-1/2 text-gray-400 text-lg cursor-pointer' onClick={toggleShowInput}>
114114
{showInput ? <FaEye /> : <FaEyeSlash />}
115115
</span>}
116116
{label &&

components/Nav.js

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default function Nav ({ leftItems, mobileItems, rightItems, unreadNotific
2222
key={item.name}
2323
href={item.href}
2424
passHref
25-
className={`text-lg text-white ${router.asPath === item.href ? 'font-bold' : 'hover:text-primary-100'}`}
25+
className={`text-lg text-gray-200 transition-colors duration-200 ${router.asPath === item.href ? 'font-bold text-accent-500' : 'hover:text-accent-400'}`}
2626
>
2727

2828
{item.name}
@@ -47,11 +47,11 @@ export default function Nav ({ leftItems, mobileItems, rightItems, unreadNotific
4747
}, [])
4848

4949
return (
50-
<div className='relative bg-primary-500'>
50+
<header className='relative bg-primary-500'>
5151
<PageContainer>
52-
<div className='flex justify-between items-center my-6 pb-6 md:justify-start md:space-x-10'>
52+
<nav className='flex justify-between items-center py-5 md:justify-start md:space-x-10'>
5353
<div className='flex justify-start lg:w-0 lg:flex-1'>
54-
<Link href='/' passHref>
54+
<Link href='/' passHref className='transition-opacity hover:opacity-80'>
5555
<span className='sr-only'>Home</span>
5656
<Image src={(process.env.BASE_PATH || '') + '/images/banmanager-icon.png'} alt='Logo' width='40' height='40' priority />
5757
</Link>
@@ -60,11 +60,15 @@ export default function Nav ({ leftItems, mobileItems, rightItems, unreadNotific
6060
{renderMenu(leftItems)}
6161
</div>
6262
<div className='md:hidden'>
63-
<button type='button' className='rounded-md w-10 h-10 p-2 relative inline-flex items-center justify-center text-white focus:outline-none focus:ring-2 focus:ring-inset focus:ring-primary-500 text-2xl' onClick={() => setDrawerOpen(true)}>
64-
<span className='sr-only'>Open menu</span>
65-
<FaBars />
63+
<button
64+
type='button'
65+
className='rounded-xl w-11 h-11 p-2.5 relative inline-flex items-center justify-center text-gray-200 bg-primary-700 border border-primary-800 hover:bg-primary-600 transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-accent-500/50'
66+
onClick={() => setDrawerOpen(true)}
67+
aria-label='Open menu'
68+
>
69+
<FaBars className='w-5 h-5' />
6670
{unreadNotificationCount > 0 && (
67-
<span className='absolute bg-red-500 text-red-100 px-2 py-1 text-xs font-bold rounded-full -top-1 -right-1'>
71+
<span className='absolute bg-error text-white px-1.5 py-0.5 text-xs font-bold rounded-full -top-1 -right-1 min-w-[18px] text-center'>
6872
{unreadNotificationCount > 9 ? '9+' : unreadNotificationCount}
6973
</span>
7074
)}
@@ -73,40 +77,38 @@ export default function Nav ({ leftItems, mobileItems, rightItems, unreadNotific
7377
<div className='hidden md:flex items-center justify-end md:flex-1 lg:w-0'>
7478
{renderMenu(rightItems)}
7579
</div>
76-
</div>
80+
</nav>
7781
</PageContainer>
7882
<NavigationOverlay drawerOpen={drawerOpen} setDrawerOpen={setDrawerOpen}>
79-
<NavigationOverlay.Body className='!px-2 flex flex-col sm:flex-row sm:justify-around'>
80-
<nav>
83+
<NavigationOverlay.Body className='!px-4 flex flex-col sm:flex-row sm:justify-around'>
84+
<nav className='space-y-2'>
8185
{renderMenu(rightItems)}
8286
{mobileItems?.map(({ href, name, icon, label, splitBorder }) => (
8387
<Fragment key={`${href}${name}`}>
8488
<Link
8589
href={href}
8690
passHref
87-
className='hover:text-accent-200 hover:bg-gray-600 flex transition-colors text-gray-100 text-xl p-2 my-4 rounded-lg'
91+
className='flex items-center transition-colors text-gray-200 hover:text-accent-400 hover:bg-primary-700 text-lg p-3 rounded-xl'
8892
>
8993

9094
{icon}
91-
<span className='mx-4 text-lg font-normal'>
95+
<span className='mx-4 font-normal'>
9296
{name}
9397
</span>
9498
{!!label &&
9599
<span className='flex-grow text-right'>
96-
<button type='button' className='w-6 h-6 text-xs rounded-full text-white bg-accent-500'>
97-
<span className='p-1'>
98-
{label}
99-
</span>
100-
</button>
100+
<span className='inline-flex items-center justify-center w-6 h-6 text-xs rounded-full text-white bg-accent-500 font-medium'>
101+
{label}
102+
</span>
101103
</span>}
102104

103105
</Link>
104-
{splitBorder && <span className='text-5xl pb-4 mb-4 border-b border-accent-200 leading-none' />}
106+
{splitBorder && <span className='block pb-4 mb-4 border-b border-primary-800' />}
105107
</Fragment>
106108
))}
107109
</nav>
108110
</NavigationOverlay.Body>
109111
</NavigationOverlay>
110-
</div>
112+
</header>
111113
)
112114
}

components/TextArea.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,17 @@ const TextArea = forwardRef((props, ref) => {
3939
text-gray-400
4040
duration-300
4141
transform
42-
-translate-y-3
43-
translate-x-1.5
42+
-translate-y-5
4443
scale-75
45-
top-2
44+
top-5
4645
left-4
4746
z-10
4847
origin-[0]
49-
start-2.5
5048
peer-focus:text-gray-500
5149
peer-placeholder-shown:scale-100
5250
peer-placeholder-shown:translate-y-0
5351
peer-focus:scale-75
52+
peer-focus:-translate-y-5
5453
rtl:peer-focus:translate-x-1/4
5554
rtl:peer-focus:left-auto
5655
${labelClassName}

styles/react-select.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.react_select .react_select__control {
2-
@apply relative w-full bg-primary-900 text-gray-400 shadow-lg rounded-3xl pl-3 pr-3 py-3 text-left cursor-default focus:outline-none focus:ring-1 focus:ring-accent-500 focus:border-accent-500 border-0
2+
@apply relative w-full bg-primary-900 text-gray-400 shadow-lg rounded-3xl pl-4 pr-4 py-2.5 text-left cursor-default focus:outline-none focus:ring-1 focus:ring-accent-500 focus:border-accent-500 border-0
33
}
44

55
.react_select .react_select__control--is-disabled {

0 commit comments

Comments
 (0)