mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
feat(console): submit form changes action bar (#2458)
This commit is contained in:
parent
4dc4322504
commit
3c9edb9ca4
9 changed files with 55 additions and 0 deletions
|
@ -0,0 +1,19 @@
|
|||
@use '@/scss/underscore' as _;
|
||||
|
||||
.container {
|
||||
position: sticky;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
border: 1px solid var(--color-line-divider);
|
||||
display: flex;
|
||||
padding: _.unit(3) _.unit(8);
|
||||
justify-content: flex-end;
|
||||
background-color: var(--color-layer-1);
|
||||
box-shadow: var(--shadow-3);
|
||||
border-radius: 12px 12px 0 0;
|
||||
|
||||
> :not(:first-child) {
|
||||
margin-left: _.unit(3);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
import Button from '../Button';
|
||||
import * as styles from './index.module.scss';
|
||||
|
||||
type Props = {
|
||||
isOpen: boolean;
|
||||
isSubmitting: boolean;
|
||||
onDiscard: () => void;
|
||||
};
|
||||
|
||||
const SubmitFormChangesActionBar = ({ isOpen, isSubmitting, onDiscard }: Props) => {
|
||||
if (!isOpen) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={styles.container}>
|
||||
<Button size="medium" title="general.discard" disabled={isSubmitting} onClick={onDiscard} />
|
||||
<Button
|
||||
isLoading={isSubmitting}
|
||||
htmlType="submit"
|
||||
type="primary"
|
||||
size="medium"
|
||||
title="general.save_changes"
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default SubmitFormChangesActionBar;
|
|
@ -10,6 +10,7 @@ const general = {
|
|||
save: 'Speichern',
|
||||
save_changes: 'Änderungen speichern',
|
||||
saved: 'Gespeichert!',
|
||||
discard: 'Discard', // UNTRANSLATED
|
||||
loading: 'Lade...',
|
||||
redirecting: 'Weiterleiten...',
|
||||
add: 'Hinzufügen',
|
||||
|
|
|
@ -10,6 +10,7 @@ const general = {
|
|||
save: 'Save',
|
||||
save_changes: 'Save Changes',
|
||||
saved: 'Saved!',
|
||||
discard: 'Discard',
|
||||
loading: 'Loading...',
|
||||
redirecting: 'Redirecting...',
|
||||
add: 'Add',
|
||||
|
|
|
@ -10,6 +10,7 @@ const general = {
|
|||
save: 'Sauvegarder',
|
||||
save_changes: 'Sauvegarder les modifications',
|
||||
saved: 'Sauvegardé !',
|
||||
discard: 'Discard', // UNTRANSLATED
|
||||
loading: 'Chargement...',
|
||||
redirecting: 'Redirection...',
|
||||
add: 'Ajouter',
|
||||
|
|
|
@ -10,6 +10,7 @@ const general = {
|
|||
save: '저장',
|
||||
save_changes: '변경 내용 저장',
|
||||
saved: '저장됨!',
|
||||
discard: 'Discard', // UNTRANSLATED
|
||||
loading: '로딩 중...',
|
||||
redirecting: '리다이렉팅 중...',
|
||||
add: '추가',
|
||||
|
|
|
@ -10,6 +10,7 @@ const general = {
|
|||
save: 'Guardar',
|
||||
save_changes: 'Guardar Alterações',
|
||||
saved: 'Guardado!',
|
||||
discard: 'Discard', // UNTRANSLATED
|
||||
loading: 'Carregando...',
|
||||
redirecting: 'Redirecionando...',
|
||||
add: 'Adicionar',
|
||||
|
|
|
@ -10,6 +10,7 @@ const general = {
|
|||
save: 'Kaydet',
|
||||
save_changes: 'Değişiklikleri Kaydet',
|
||||
saved: 'Kaydedildi!',
|
||||
discard: 'Discard', // UNTRANSLATED
|
||||
loading: 'Yükleniyor...',
|
||||
redirecting: 'Yönlendiriliyor...',
|
||||
add: 'Ekle',
|
||||
|
|
|
@ -10,6 +10,7 @@ const general = {
|
|||
save: '保存',
|
||||
save_changes: '保存更改',
|
||||
saved: '保存成功!',
|
||||
discard: 'Discard', // UNTRANSLATED
|
||||
loading: '读取中...',
|
||||
redirecting: '页面跳转中...',
|
||||
add: '添加',
|
||||
|
|
Loading…
Reference in a new issue