extracted string from Colors Tab

This commit is contained in:
Amruth Pillai
2020-03-30 11:08:04 +05:30
parent a0e17396ac
commit a30c9ffd4b
4 changed files with 19 additions and 23 deletions

View File

@ -16,8 +16,8 @@ const RightSidebar = () => {
const { state, dispatch } = context;
const { data, theme } = state;
const tabs = [t('templates.title'), 'Colors', 'Fonts', 'Actions', 'About'];
const [currentTab, setCurrentTab] = useState(t('templates.title'));
const tabs = [t('templates.title'), t('colors.title'), 'Fonts', 'Actions', 'About'];
const [currentTab, setCurrentTab] = useState(t('colors.title'));
const onChange = (key, value) => {
dispatch({
type: 'on_input',
@ -34,7 +34,7 @@ const RightSidebar = () => {
switch (currentTab) {
case t('templates.title'):
return <TemplatesTab theme={theme} onChange={onChange} />;
case 'Colors':
case t('colors.title'):
return <ColorsTab theme={theme} onChange={onChange} />;
case 'Fonts':
return <FontsTab theme={theme} onChange={onChange} />;