diff --git a/src/Components/Inputs/TagsInput/TagsInput.tsx b/src/Components/Inputs/TagsInput/TagsInput.tsx index 7b67e38..2592cec 100644 --- a/src/Components/Inputs/TagsInput/TagsInput.tsx +++ b/src/Components/Inputs/TagsInput/TagsInput.tsx @@ -1,6 +1,5 @@ import { useController } from "react-hook-form"; -import Badge from "src/Components/Badge/Badge"; // import CreatableSelect from 'react-select/creatable'; import Select from 'react-select' import { OnChangeValue, StylesConfig, components, OptionProps } from "react-select"; @@ -73,12 +72,23 @@ const colourStyles: StylesConfig = { control: (styles, state) => ({ ...styles, padding: '1px 0', - border: 'none' + border: 'none', + boxShadow: 'none', + + ":hover": { + cursor: "pointer" + } + }), - indicatorSeparator: (styles, state) => ({ + multiValueRemove: (styles) => ({ ...styles, - display: "none" + ":hover": { + background: 'none' + } }), + indicatorsContainer: () => ({ display: 'none' }), + clearIndicator: () => ({ display: 'none' }), + indicatorSeparator: () => ({ display: "none" }), input: (styles, state) => ({ ...styles, " input": { @@ -135,13 +145,11 @@ export default function TagsInput({ isMulti isOptionDisabled={() => maxReached} placeholder={currentPlaceholder} - isClearable noOptionsMessage={() => { return maxReached ? "You've reached the max number of tags." : "No tags available"; }} - closeMenuOnSelect={false} value={value.map(transformer.tagToOption)} onChange={handleChange as any} diff --git a/src/features/Posts/pages/CreatePostPage/CreateStoryPage/CreateStoryPage.tsx b/src/features/Posts/pages/CreatePostPage/CreateStoryPage/CreateStoryPage.tsx index 63b3753..65361eb 100644 --- a/src/features/Posts/pages/CreatePostPage/CreateStoryPage/CreateStoryPage.tsx +++ b/src/features/Posts/pages/CreatePostPage/CreateStoryPage/CreateStoryPage.tsx @@ -28,9 +28,9 @@ const FileSchema = yup.lazy((value: string | File[]) => { }) const schema = yup.object({ - title: yup.string().trim().required().min(10, 'the title is too short'), - tags: yup.array().required().min(1, 'please pick at least one relevant tag'), - body: yup.string().required().min(50, 'stories should have a minimum of 10 words'), + title: yup.string().trim().required().min(10, 'Story title must be 2+ words'), + tags: yup.array().required().min(1, 'Add at least one tag'), + body: yup.string().required().min(50, 'Post must contain at least 10+ words'), cover_image: yup.array().of(FileSchema as any) }).required();