Minor UI changes
This commit is contained in:
@@ -52,13 +52,13 @@ const TagInput: React.FC<TagInputProps> = ({ tags, setTags }) => {
|
|||||||
onChange={handleInputChange} // Use the dynamic check handler
|
onChange={handleInputChange} // Use the dynamic check handler
|
||||||
/>
|
/>
|
||||||
{error && <div className="text-red-500 mt-2">{error}</div>}
|
{error && <div className="text-red-500 mt-2">{error}</div>}
|
||||||
<Button onPress={handleAddTag} disabled={!!error}>Add</Button>
|
<Button onPress={handleAddTag} disabled={!!error} className="mt-2 bg-primary-50 dark:bg-primary-800">Add</Button>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex gap-2 flex-wrap mt-4">
|
<div className="flex gap-2 flex-wrap mt-4">
|
||||||
{tags.map((tag, index) => (
|
{tags.map((tag, index) => (
|
||||||
<div
|
<div
|
||||||
key={index}
|
key={index}
|
||||||
className="flex items-center gap-1 bg-gray-200 p-2 rounded"
|
className="flex items-center gap-1 bg-primary-50 dark:bg-primary-800 p-2 rounded"
|
||||||
>
|
>
|
||||||
<span>{tag}</span>
|
<span>{tag}</span>
|
||||||
<button
|
<button
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ function CreatePostPage() {
|
|||||||
<ArrowUTurnLeftIcon />
|
<ArrowUTurnLeftIcon />
|
||||||
</Button>
|
</Button>
|
||||||
</section>
|
</section>
|
||||||
<section className="w-8/12 mx-auto p-5 bg-primary-100 border border-none rounded-2xl">
|
<section className="w-8/12 mx-auto p-5 bg-primary-100 dark:bg-primary-950 border border-none rounded-2xl">
|
||||||
<Formik
|
<Formik
|
||||||
initialValues={initialValues}
|
initialValues={initialValues}
|
||||||
validationSchema={validationSchema}
|
validationSchema={validationSchema}
|
||||||
@@ -153,7 +153,7 @@ function CreatePostPage() {
|
|||||||
<div className="flex flex-row-reverse">
|
<div className="flex flex-row-reverse">
|
||||||
<Button
|
<Button
|
||||||
type="submit"
|
type="submit"
|
||||||
className="bg-primary-950 text-white text-xl w-1/12"
|
className="bg-primary-950 dark:bg-primary-600 text-white text-xl w-1/12"
|
||||||
disabled={!isValid || !dirty || isSubmitting}
|
disabled={!isValid || !dirty || isSubmitting}
|
||||||
>
|
>
|
||||||
<p>Post</p>
|
<p>Post</p>
|
||||||
|
|||||||
@@ -147,14 +147,14 @@ function EditPostPage() {
|
|||||||
<ArrowUTurnLeftIcon />
|
<ArrowUTurnLeftIcon />
|
||||||
</Button>
|
</Button>
|
||||||
</section>
|
</section>
|
||||||
<section className="w-8/12 mx-auto p-5 bg-primary-100 border border-none rounded-2xl">
|
<section className="w-8/12 mx-auto p-5 bg-primary-100 dark:bg-primary-950 border border-none rounded-2xl">
|
||||||
{!loading && (
|
{!loading && (
|
||||||
<Formik
|
<Formik
|
||||||
initialValues={{ ...post, tags: tags || [] }}
|
initialValues={{ ...post, tags: tags || [] }}
|
||||||
validationSchema={validationSchema}
|
validationSchema={validationSchema}
|
||||||
onSubmit={handleSubmit}
|
onSubmit={handleSubmit}
|
||||||
>
|
>
|
||||||
{({ isValid, dirty, isSubmitting, setFieldValue, values }) => (
|
{({ isValid, dirty, isSubmitting, setFieldValue }) => (
|
||||||
<Form className="flex flex-col gap-5">
|
<Form className="flex flex-col gap-5">
|
||||||
<div>
|
<div>
|
||||||
<NextUIFormikInput
|
<NextUIFormikInput
|
||||||
@@ -193,7 +193,7 @@ function EditPostPage() {
|
|||||||
<div className="flex flex-row-reverse">
|
<div className="flex flex-row-reverse">
|
||||||
<Button
|
<Button
|
||||||
type="submit"
|
type="submit"
|
||||||
className="bg-primary-950 text-white text-xl w-1/6"
|
className="bg-primary-950 dark:bg-primary-600 text-white text-xl w-1/6"
|
||||||
disabled={!isValid || !dirty || isSubmitting}
|
disabled={!isValid || !dirty || isSubmitting}
|
||||||
>
|
>
|
||||||
<p>Update</p>
|
<p>Update</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user