mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-27 18:52:14 +03:00
Updated Portal back button translations
refs https://github.com/TryGhost/Ghost/issues/16628
This commit is contained in:
parent
97584cf0c4
commit
6aa8fa2a8e
@ -1,4 +1,5 @@
|
||||
import React from 'react';
|
||||
import React, {useContext} from 'react';
|
||||
import AppContext from '../../AppContext';
|
||||
import {ReactComponent as LeftArrowIcon} from '../../images/icons/arrow-left.svg';
|
||||
|
||||
export const BackButtonStyles = `
|
||||
@ -40,11 +41,17 @@ export const BackButtonStyles = `
|
||||
}
|
||||
`;
|
||||
|
||||
function ActionButton({label = 'Back', brandColor = '#3eb0ef', hidden = false, onClick}) {
|
||||
function ActionButton({label = null, brandColor = '#3eb0ef', hidden = false, onClick}) {
|
||||
const {t} = useContext(AppContext);
|
||||
|
||||
if (hidden) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (label === null) {
|
||||
label = t('Back');
|
||||
}
|
||||
|
||||
return (
|
||||
<button className='gh-portal-btn gh-portal-btn-back' onClick={e => onClick(e)}>
|
||||
<LeftArrowIcon /> {label}
|
||||
|
Loading…
Reference in New Issue
Block a user