diff --git a/packages/console/src/components/SubmitFormChangesActionBar/index.module.scss b/packages/console/src/components/SubmitFormChangesActionBar/index.module.scss new file mode 100644 index 000000000..055894f08 --- /dev/null +++ b/packages/console/src/components/SubmitFormChangesActionBar/index.module.scss @@ -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); + } +} diff --git a/packages/console/src/components/SubmitFormChangesActionBar/index.tsx b/packages/console/src/components/SubmitFormChangesActionBar/index.tsx new file mode 100644 index 000000000..b8b0e1d2c --- /dev/null +++ b/packages/console/src/components/SubmitFormChangesActionBar/index.tsx @@ -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 ( +
+
+ ); +}; + +export default SubmitFormChangesActionBar; diff --git a/packages/phrases/src/locales/de/translation/admin-console/general.ts b/packages/phrases/src/locales/de/translation/admin-console/general.ts index adba1781f..635772f57 100644 --- a/packages/phrases/src/locales/de/translation/admin-console/general.ts +++ b/packages/phrases/src/locales/de/translation/admin-console/general.ts @@ -10,6 +10,7 @@ const general = { save: 'Speichern', save_changes: 'Änderungen speichern', saved: 'Gespeichert!', + discard: 'Discard', // UNTRANSLATED loading: 'Lade...', redirecting: 'Weiterleiten...', add: 'Hinzufügen', diff --git a/packages/phrases/src/locales/en/translation/admin-console/general.ts b/packages/phrases/src/locales/en/translation/admin-console/general.ts index 8e368db3d..5b5aa4c7d 100644 --- a/packages/phrases/src/locales/en/translation/admin-console/general.ts +++ b/packages/phrases/src/locales/en/translation/admin-console/general.ts @@ -10,6 +10,7 @@ const general = { save: 'Save', save_changes: 'Save Changes', saved: 'Saved!', + discard: 'Discard', loading: 'Loading...', redirecting: 'Redirecting...', add: 'Add', diff --git a/packages/phrases/src/locales/fr/translation/admin-console/general.ts b/packages/phrases/src/locales/fr/translation/admin-console/general.ts index ae1ab845b..7998bb7a2 100644 --- a/packages/phrases/src/locales/fr/translation/admin-console/general.ts +++ b/packages/phrases/src/locales/fr/translation/admin-console/general.ts @@ -10,6 +10,7 @@ const general = { save: 'Sauvegarder', save_changes: 'Sauvegarder les modifications', saved: 'Sauvegardé !', + discard: 'Discard', // UNTRANSLATED loading: 'Chargement...', redirecting: 'Redirection...', add: 'Ajouter', diff --git a/packages/phrases/src/locales/ko/translation/admin-console/general.ts b/packages/phrases/src/locales/ko/translation/admin-console/general.ts index 798e15207..ac65789e8 100644 --- a/packages/phrases/src/locales/ko/translation/admin-console/general.ts +++ b/packages/phrases/src/locales/ko/translation/admin-console/general.ts @@ -10,6 +10,7 @@ const general = { save: '저장', save_changes: '변경 내용 저장', saved: '저장됨!', + discard: 'Discard', // UNTRANSLATED loading: '로딩 중...', redirecting: '리다이렉팅 중...', add: '추가', diff --git a/packages/phrases/src/locales/pt-pt/translation/admin-console/general.ts b/packages/phrases/src/locales/pt-pt/translation/admin-console/general.ts index 955eb7383..847456538 100644 --- a/packages/phrases/src/locales/pt-pt/translation/admin-console/general.ts +++ b/packages/phrases/src/locales/pt-pt/translation/admin-console/general.ts @@ -10,6 +10,7 @@ const general = { save: 'Guardar', save_changes: 'Guardar Alterações', saved: 'Guardado!', + discard: 'Discard', // UNTRANSLATED loading: 'Carregando...', redirecting: 'Redirecionando...', add: 'Adicionar', diff --git a/packages/phrases/src/locales/tr-tr/translation/admin-console/general.ts b/packages/phrases/src/locales/tr-tr/translation/admin-console/general.ts index 1a75ffff0..19d6119a4 100644 --- a/packages/phrases/src/locales/tr-tr/translation/admin-console/general.ts +++ b/packages/phrases/src/locales/tr-tr/translation/admin-console/general.ts @@ -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', diff --git a/packages/phrases/src/locales/zh-cn/translation/admin-console/general.ts b/packages/phrases/src/locales/zh-cn/translation/admin-console/general.ts index 5dd98f434..4083b0f01 100644 --- a/packages/phrases/src/locales/zh-cn/translation/admin-console/general.ts +++ b/packages/phrases/src/locales/zh-cn/translation/admin-console/general.ts @@ -10,6 +10,7 @@ const general = { save: '保存', save_changes: '保存更改', saved: '保存成功!', + discard: 'Discard', // UNTRANSLATED loading: '读取中...', redirecting: '页面跳转中...', add: '添加',