-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(@leav/ui): adapt multivalue to ds (#636)
* feat(@leav/ui): Adapt multivalue to DS * feat(@leav/ui): Remove StandardFieldValueRead and use StandardField even for formated values --------- Co-authored-by: Philippe Chevieux <[email protected]>
- Loading branch information
1 parent
810391e
commit 7338b86
Showing
45 changed files
with
1,418 additions
and
3,762 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
...onents/RecordEdition/EditRecordContent/uiElements/StandardField/DeleteAllValuesButton.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Copyright LEAV Solutions 2017 until 2023/11/05, Copyright Aristid from 2023/11/06 | ||
// This file is released under LGPL V3 | ||
// License text available at https://www.gnu.org/licenses/lgpl-3.0.txt | ||
import {useSharedTranslation} from '_ui/hooks/useSharedTranslation'; | ||
import {KitButton, KitModal} from 'aristid-ds'; | ||
import {FunctionComponent} from 'react'; | ||
|
||
export const DeleteAllValuesButton: FunctionComponent<{handleDelete: () => Promise<void>}> = ({handleDelete}) => { | ||
const {t} = useSharedTranslation(); | ||
|
||
const _confirmDeleteAllValues = () => { | ||
KitModal.confirm({ | ||
title: t('record_edition.delete_all_values'), | ||
content: t('record_edition.delete_all_values_confirm'), | ||
icon: false, | ||
showSecondaryCta: true, | ||
showCloseIcon: false, | ||
dangerConfirm: true, | ||
type: 'confirm', | ||
okText: t('global.confirm'), | ||
cancelText: t('global.cancel'), | ||
onOk: handleDelete | ||
}); | ||
}; | ||
|
||
return ( | ||
<KitButton type="tertiary" size="s" onClick={_confirmDeleteAllValues}> | ||
{t('record_edition.delete_all')} | ||
</KitButton> | ||
); | ||
}; |
Oops, something went wrong.