Project Configuration Configuration option for whole Template
Able Pro has a single source of truth for default configuration which lets users manage it effectively. It also makes it scalable for new configurations. you can set configs like font, border, theme layout, locale, etc. All those can be configured at ..src/config.js
en
- English
fr
- français
ro
- Română
zh
- 中国人
different preset for theme.
JavaScript TypeScript
Copy // next
import { Roboto } from 'next/font/google' ;
// ==============================|| THEME CONSTANT ||============================== //
export const twitterColor = '#1DA1F2' ;
export const facebookColor = '#3b5998' ;
export const linkedInColor = '#0e76a8' ;
export const APP_DEFAULT_PATH = '/dashboard/default' ;
export const HORIZONTAL_MAX_ITEM = 7 ;
export const DRAWER_WIDTH = 280 ;
export const MINI_DRAWER_WIDTH = 90 ;
export const HEADER_HEIGHT = 74 ;
const roboto = Roboto ({
subsets : [ 'latin' ] ,
fallback : [ 'sans-serif' ] ,
weight : [ '300' , '400' , '500' , '700' ] ,
adjustFontFallback : false
});
export let ThemeMode;
( function (ThemeMode) {
ThemeMode[ 'LIGHT' ] = 'light' ;
ThemeMode[ 'DARK' ] = 'dark' ;
ThemeMode[ 'AUTO' ] = 'auto' ;
})(ThemeMode || (ThemeMode = {}));
export let MenuOrientation;
( function (MenuOrientation) {
MenuOrientation[ 'VERTICAL' ] = 'vertical' ;
MenuOrientation[ 'HORIZONTAL' ] = 'horizontal' ;
})(MenuOrientation || (MenuOrientation = {}));
export let ThemeDirection;
( function (ThemeDirection) {
ThemeDirection[ 'LTR' ] = 'ltr' ;
ThemeDirection[ 'RTL' ] = 'rtl' ;
})(ThemeDirection || (ThemeDirection = {}));
export let NavActionType;
( function (NavActionType) {
NavActionType[ 'FUNCTION' ] = 'function' ;
NavActionType[ 'LINK' ] = 'link' ;
})(NavActionType || (NavActionType = {}));
export let Gender;
( function (Gender) {
Gender[ 'MALE' ] = 'Male' ;
Gender[ 'FEMALE' ] = 'Female' ;
})(Gender || (Gender = {}));
export let DropzopType;
( function (DropzopType) {
DropzopType[ 'default' ] = 'DEFAULT' ;
DropzopType[ 'standard' ] = 'STANDARD' ;
})(DropzopType || (DropzopType = {}));
// ==============================|| THEME CONFIG ||============================== //
const config = {
fontFamily : roboto . style .fontFamily ,
i18n : 'en' ,
menuOrientation : MenuOrientation . VERTICAL ,
menuCaption : true ,
miniDrawer : false ,
container : false ,
mode : ThemeMode . LIGHT ,
presetColor : 'default' ,
themeDirection : ThemeDirection . LTR ,
themeContrast : false
};
export default config;
Copy // next
import { Roboto } from 'next/font/google' ;
// types
import { DefaultConfigProps } from 'types/config' ;
// ==============================|| THEME CONSTANT ||============================== //
export const twitterColor = '#1DA1F2' ;
export const facebookColor = '#3b5998' ;
export const linkedInColor = '#0e76a8' ;
export const APP_DEFAULT_PATH = '/dashboard/default' ;
export const HORIZONTAL_MAX_ITEM = 7 ;
export const DRAWER_WIDTH = 280 ;
export const MINI_DRAWER_WIDTH = 90 ;
export const HEADER_HEIGHT = 74 ;
const roboto = Roboto ({
subsets : [ 'latin' ] ,
fallback : [ 'sans-serif' ] ,
weight : [ '300' , '400' , '500' , '700' ] ,
adjustFontFallback : false
});
export enum ThemeMode {
LIGHT = 'light' ,
DARK = 'dark' ,
AUTO = 'auto'
}
export enum MenuOrientation {
VERTICAL = 'vertical' ,
HORIZONTAL = 'horizontal'
}
export enum ThemeDirection {
LTR = 'ltr' ,
RTL = 'rtl'
}
export enum NavActionType {
FUNCTION = 'function' ,
LINK = 'link'
}
export enum Gender {
MALE = 'Male' ,
FEMALE = 'Female'
}
export enum DropzopType {
default = 'DEFAULT' ,
standard = 'STANDARD'
}
// ==============================|| THEME CONFIG ||============================== //
const config : DefaultConfigProps = {
fontFamily : roboto . style .fontFamily ,
i18n : 'en' ,
menuOrientation : MenuOrientation . VERTICAL ,
menuCaption : true ,
miniDrawer : false ,
container : false ,
mode : ThemeMode . LIGHT ,
presetColor : 'default' ,
themeDirection : ThemeDirection . LTR ,
themeContrast : false
};
export default config;
```
Last updated 3 months ago