mirror of
https://github.com/strapi/strapi.git
synced 2025-08-01 13:29:01 +00:00
fixed edit folder move error message and style
This commit is contained in:
parent
7501348524
commit
cc76f01140
@ -11,7 +11,7 @@ import getSelectStyles from './utils/getSelectStyles';
|
||||
|
||||
const ReactSelect = ({ components, styles, ...props }) => {
|
||||
const theme = useTheme();
|
||||
const customStyles = getSelectStyles(theme);
|
||||
const customStyles = getSelectStyles(theme, props);
|
||||
|
||||
return (
|
||||
<Select
|
||||
|
@ -1,4 +1,4 @@
|
||||
const getSelectStyles = theme => {
|
||||
const getSelectStyles = (theme, { 'aria-errormessage': error }) => {
|
||||
return {
|
||||
clearIndicator: base => ({ ...base, padding: 0, paddingRight: theme.spaces[3] }),
|
||||
container: base => ({
|
||||
@ -13,6 +13,8 @@ const getSelectStyles = theme => {
|
||||
|
||||
if (state.isFocused) {
|
||||
border = `1px solid ${theme.colors.primary600} !important`;
|
||||
} else if (error) {
|
||||
border = `1px solid ${theme.colors.danger600} !important`;
|
||||
} else {
|
||||
border = `1px solid ${theme.colors.neutral200} !important`;
|
||||
}
|
||||
|
@ -45,10 +45,10 @@ export const EditFolderDialog = ({ onClose, folder, parentFolderId }) => {
|
||||
const submitButtonRef = useRef(null);
|
||||
const [showConfirmDialog, setShowConfirmDialog] = useState(false);
|
||||
const { formatMessage, formatDate } = useIntl();
|
||||
const { editFolder, isLoading: isEditFolderLoading } = useEditFolder();
|
||||
const { editFolder } = useEditFolder();
|
||||
const { remove } = useBulkRemove();
|
||||
const toggleNotification = useNotification();
|
||||
const isLoading = isLoadingPermissions || folderStructureIsLoading || isEditFolderLoading;
|
||||
const isLoading = isLoadingPermissions || folderStructureIsLoading;
|
||||
const isEditing = !!folder;
|
||||
const formDisabled = (folder && !canUpdate) || (!folder && !canCreate);
|
||||
const initialFormData = !folderStructureIsLoading && {
|
||||
|
Loading…
x
Reference in New Issue
Block a user