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
|
||||
/>
|
||||
{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 className="flex gap-2 flex-wrap mt-4">
|
||||
{tags.map((tag, index) => (
|
||||
<div
|
||||
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>
|
||||
<button
|
||||
|
||||
@@ -114,7 +114,7 @@ function CreatePostPage() {
|
||||
<ArrowUTurnLeftIcon />
|
||||
</Button>
|
||||
</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
|
||||
initialValues={initialValues}
|
||||
validationSchema={validationSchema}
|
||||
@@ -153,7 +153,7 @@ function CreatePostPage() {
|
||||
<div className="flex flex-row-reverse">
|
||||
<Button
|
||||
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}
|
||||
>
|
||||
<p>Post</p>
|
||||
|
||||
@@ -147,14 +147,14 @@ function EditPostPage() {
|
||||
<ArrowUTurnLeftIcon />
|
||||
</Button>
|
||||
</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 && (
|
||||
<Formik
|
||||
initialValues={{ ...post, tags: tags || [] }}
|
||||
validationSchema={validationSchema}
|
||||
onSubmit={handleSubmit}
|
||||
>
|
||||
{({ isValid, dirty, isSubmitting, setFieldValue, values }) => (
|
||||
{({ isValid, dirty, isSubmitting, setFieldValue }) => (
|
||||
<Form className="flex flex-col gap-5">
|
||||
<div>
|
||||
<NextUIFormikInput
|
||||
@@ -193,7 +193,7 @@ function EditPostPage() {
|
||||
<div className="flex flex-row-reverse">
|
||||
<Button
|
||||
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}
|
||||
>
|
||||
<p>Update</p>
|
||||
|
||||
Reference in New Issue
Block a user