Sidebar

  • To get the default value of theme scheme or direction , theme color go to the src/store/setting/state.tsx.
sidebar_color
  • Property: "theme_style_appearance"
  • Choices: 'sidebar-white', 'sidebar-dark', 'sidebar-color'

Example

sidebar_color: {"value": "sidebar-white"}
sidebar_type
  • Property: "sidebar_type"
  • Choices: "sidebar-hover", "sidebar-mini", "sidebar-soft"
  • Values are in array

Example

"sidebar_type": {"value": []}
sidebar_menu_style
  • Property: "sidebar_menu_style"
  • Choices: "sidebar-default navs-rounded", "sidebar-default navs-rounded-all", "sidebar-default navs-pill", "sidebar-default navs-pill-all"
  • Values are in string

Example

"sidebar_menu_style": {"value": "sidebar-default navs-rounded-all"}
To get the current value of the following you can use:
  • first import useSelector from react-redux
  • import the selectors files from src/store/setting/selectors in your component.
  • import this file as top of your component using following example code in your component.
import { useSelector } from "react-redux";
import * as SettingSelector from '../store/setting/selectors'
  • then use the following code in your component to get the current value.
sidebar_color
const sidebarColor = useSelector(SettingSelector.sidebar_color)
sidebar_type
const sidebarType = useSelector(SettingSelector.sidebar_type)
sidebar_menu_style
const sidebarMenuStyle = useSelector(SettingSelector.sidebar_menu_style)
To use action you can use dispatch to update state.js.
  • first import usedispatch from react-redux.
  • import the actions files from src/store/setting/actons in your component.
  • import this file as top of your component using following example code in your component.
import { useDispatch } from "react-redux";
import { sidebar_color } from "../../../store/setting/actions";
  • then write the following code inside the function component for use of dispatch method inside your component.
const dispatch = useDispatch();
  • then use the following code in your component to dispatch or change the new value of scheme.
sidebar_color
dispatch(sidebar_color(value))
sidebar_type
dispatch(sidebar_type(value))
sidebar_menu_style
dispatch(sidebar_menu_style(value))
Note: This Feature Support Only Deshboard