Refactor collection creation UI (#6485)
* Iteration, before functional component * Use react-hook-form, shared form for new and edit * Avoid negative margin on input prefix * Centered now default for modals
This commit is contained in:
@@ -71,7 +71,6 @@ function ApiKeys() {
|
||||
title={t("Create a token")}
|
||||
onRequestClose={handleNewModalClose}
|
||||
isOpen={newModalOpen}
|
||||
isCentered
|
||||
>
|
||||
<APITokenNew onSubmit={handleNewModalClose} />
|
||||
</Modal>
|
||||
|
||||
@@ -113,7 +113,6 @@ function Details() {
|
||||
dialogs.openModal({
|
||||
title: t("Delete workspace"),
|
||||
content: <TeamDelete onSubmit={dialogs.closeAllModals} />,
|
||||
isCentered: true,
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@ function Export() {
|
||||
|
||||
dialogs.openModal({
|
||||
title: t("Export data"),
|
||||
isCentered: true,
|
||||
content: <ExportDialog onSubmit={dialogs.closeAllModals} />,
|
||||
});
|
||||
},
|
||||
|
||||
@@ -51,7 +51,6 @@ function Import() {
|
||||
onClick={() => {
|
||||
dialogs.openModal({
|
||||
title: t("Import data"),
|
||||
isCentered: true,
|
||||
content: <ImportMarkdownDialog />,
|
||||
});
|
||||
}}
|
||||
@@ -77,7 +76,6 @@ function Import() {
|
||||
onClick={() => {
|
||||
dialogs.openModal({
|
||||
title: t("Import data"),
|
||||
isCentered: true,
|
||||
content: <ImportJSONDialog />,
|
||||
});
|
||||
}}
|
||||
@@ -98,7 +96,6 @@ function Import() {
|
||||
onClick={() => {
|
||||
dialogs.openModal({
|
||||
title: t("Import data"),
|
||||
isCentered: true,
|
||||
content: <ImportNotionDialog />,
|
||||
});
|
||||
}}
|
||||
|
||||
@@ -43,7 +43,6 @@ function Preferences() {
|
||||
dialogs.openModal({
|
||||
title: t("Delete account"),
|
||||
content: <UserDelete onSubmit={dialogs.closeAllModals} />,
|
||||
isCentered: true,
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -102,7 +102,6 @@ function Security() {
|
||||
|
||||
if (inviteRequired) {
|
||||
dialogs.openModal({
|
||||
isCentered: true,
|
||||
title: t("Are you sure you want to require invites?"),
|
||||
content: (
|
||||
<ConfirmationDialog
|
||||
|
||||
@@ -76,7 +76,6 @@ const FileOperationListItem = ({ fileOperation }: Props) => {
|
||||
|
||||
const handleConfirmDelete = React.useCallback(async () => {
|
||||
dialogs.openModal({
|
||||
isCentered: true,
|
||||
title: t("Are you sure you want to delete this import?"),
|
||||
content: (
|
||||
<ConfirmationDialog
|
||||
|
||||
Reference in New Issue
Block a user