mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-22 22:35:45 +00:00
refactor(FE): Refine drawer header and uniformity form styles
This commit is contained in:
@@ -58,6 +58,7 @@ const DrawerHeader = ({
|
|||||||
if (leftIconOnClick) {
|
if (leftIconOnClick) {
|
||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
|
type='button'
|
||||||
onClick={leftIconOnClick}
|
onClick={leftIconOnClick}
|
||||||
className='hover:text-gray-400 bg-transparent border-none p-0'
|
className='hover:text-gray-400 bg-transparent border-none p-0'
|
||||||
>
|
>
|
||||||
@@ -72,12 +73,12 @@ const DrawerHeader = ({
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
'flex flex-row justify-between items-center px-4 pt-4',
|
'flex flex-row justify-between items-center px-4 pt-4 pb-4 border-b border-base-content/10',
|
||||||
className
|
className
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{/* Left Side */}
|
{/* Left Side */}
|
||||||
<div className='flex flex-row h-full gap-2 items-center'>
|
<div className='flex flex-row h-full gap-3 items-center'>
|
||||||
{renderLeftIcon()}
|
{renderLeftIcon()}
|
||||||
|
|
||||||
{showDivider && subtitle && (
|
{showDivider && subtitle && (
|
||||||
@@ -85,7 +86,12 @@ const DrawerHeader = ({
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{subtitle && (
|
{subtitle && (
|
||||||
<div className={cn('text-sm text-neutral', subtitleClassName)}>
|
<div
|
||||||
|
className={cn(
|
||||||
|
'text-sm font-medium text-base-content/50',
|
||||||
|
subtitleClassName
|
||||||
|
)}
|
||||||
|
>
|
||||||
{subtitle}
|
{subtitle}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -493,24 +493,25 @@ const UniformityForm = ({
|
|||||||
<>
|
<>
|
||||||
<section className='w-full'>
|
<section className='w-full'>
|
||||||
<DrawerHeader
|
<DrawerHeader
|
||||||
leftIcon={formType == 'add' ? 'mdi:close' : 'mdi:arrow-left'}
|
leftIcon={formType == 'add' ? 'heroicons:x-mark' : 'mdi:arrow-left'}
|
||||||
leftIconSize={24}
|
leftIconSize={20}
|
||||||
leftIconHref={
|
leftIconHref={
|
||||||
formType == 'add'
|
formType == 'add'
|
||||||
? '/production/uniformity'
|
? '/production/uniformity'
|
||||||
: `/production/uniformity/detail`
|
: `/production/uniformity/detail`
|
||||||
}
|
}
|
||||||
leftIconClassName='hover:text-gray-400'
|
leftIconClassName='hover:text-base-content'
|
||||||
subtitle={formType == 'add' ? 'Add Uniformity' : 'Update Uniformity'}
|
subtitle={formType == 'add' ? 'Add Uniformity' : 'Update Uniformity'}
|
||||||
subtitleClassName='text-sm text-neutral'
|
subtitleClassName='text-sm font-medium text-base-content/50'
|
||||||
showDivider
|
showDivider
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div className='divider mt-3'></div>
|
<section className='w-full p-4'>
|
||||||
<section className='w-full px-6 mb-6'>
|
<h2 className='text-base font-medium text-base-content/50 font-roboto'>
|
||||||
<h2 className='text-2xl font-semibold mb-6'>Informasi Umum</h2>
|
Informasi Umum
|
||||||
|
</h2>
|
||||||
|
|
||||||
<form onSubmit={handleFormSubmit} className='flex flex-col gap-6'>
|
<form onSubmit={handleFormSubmit} className='flex flex-col gap-1'>
|
||||||
<DateInput
|
<DateInput
|
||||||
required
|
required
|
||||||
label='Tanggal'
|
label='Tanggal'
|
||||||
@@ -760,7 +761,7 @@ const UniformityForm = ({
|
|||||||
<Button
|
<Button
|
||||||
type='submit'
|
type='submit'
|
||||||
color='primary'
|
color='primary'
|
||||||
className='w-full'
|
className='w-full mt-6'
|
||||||
disabled={formik.isSubmitting}
|
disabled={formik.isSubmitting}
|
||||||
>
|
>
|
||||||
{formik.isSubmitting ? (
|
{formik.isSubmitting ? (
|
||||||
|
|||||||
Reference in New Issue
Block a user