import React, { useState, useContext } from 'react';
import AppContext from '../../context/AppContext';
import TabBar from '../../shared/TabBar';
import TemplatesTab from './tabs/Templates';
import ColorsTab from './tabs/Colors';
import FontsTab from './tabs/Fonts';
import ActionsTab from './tabs/Actions';
import AboutTab from './tabs/About';
const tabs = ['Templates', 'Colors', 'Fonts', 'Actions', 'About'];
const RightSidebar = () => {
const context = useContext(AppContext);
const { state, dispatch } = context;
const { data, theme } = state;
const [currentTab, setCurrentTab] = useState('About');
const onChange = (key, value) => {
dispatch({
type: 'on_input',
payload: {
key,
value,
},
});
dispatch({ type: 'save_data' });
};
const renderTabs = () => {
switch (currentTab) {
case 'Templates':
return