Add type definition for custom theme
This commit is contained in:
parent
e46529b25b
commit
54ff094b64
@ -277,7 +277,15 @@ GitProfile.propTypes = {
|
|||||||
disableSwitch: PropTypes.bool,
|
disableSwitch: PropTypes.bool,
|
||||||
respectPrefersColorScheme: PropTypes.bool,
|
respectPrefersColorScheme: PropTypes.bool,
|
||||||
themes: PropTypes.array,
|
themes: PropTypes.array,
|
||||||
customTheme: PropTypes.object,
|
customTheme: PropTypes.shape({
|
||||||
|
primary: PropTypes.string,
|
||||||
|
secondary: PropTypes.string,
|
||||||
|
accent: PropTypes.string,
|
||||||
|
neutral: PropTypes.string,
|
||||||
|
'base-100': PropTypes.string,
|
||||||
|
'--rounded-box': PropTypes.string,
|
||||||
|
'--rounded-btn': PropTypes.string,
|
||||||
|
}),
|
||||||
}),
|
}),
|
||||||
}).isRequired,
|
}).isRequired,
|
||||||
};
|
};
|
||||||
|
|||||||
39
types/index.d.ts
vendored
39
types/index.d.ts
vendored
@ -128,6 +128,43 @@ export interface Hotjar {
|
|||||||
snippetVersion?: number;
|
snippetVersion?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface CustomTheme {
|
||||||
|
/**
|
||||||
|
* Primary color
|
||||||
|
*/
|
||||||
|
primary?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Secondary color
|
||||||
|
*/
|
||||||
|
secondary?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Accent color
|
||||||
|
*/
|
||||||
|
accent?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Neutral color
|
||||||
|
*/
|
||||||
|
neutral?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Base color of page
|
||||||
|
*/
|
||||||
|
'base-100'?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Border radius of rounded-box
|
||||||
|
*/
|
||||||
|
'--rounded-box'?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Border radius of rounded-btn
|
||||||
|
*/
|
||||||
|
'--rounded-btn'?: string;
|
||||||
|
}
|
||||||
|
|
||||||
export interface ThemeConfig {
|
export interface ThemeConfig {
|
||||||
/**
|
/**
|
||||||
* Default theme
|
* Default theme
|
||||||
@ -152,7 +189,7 @@ export interface ThemeConfig {
|
|||||||
/**
|
/**
|
||||||
* Custom theme
|
* Custom theme
|
||||||
*/
|
*/
|
||||||
customTheme?: object;
|
customTheme?: CustomTheme;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Experience {
|
export interface Experience {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user