docs: show and copy the theme codes of user changes

This commit is contained in:
unix
2020-04-11 09:26:36 +08:00
parent 7452fe1279
commit 156b39ded8
14 changed files with 178 additions and 65 deletions

View File

@@ -14,11 +14,11 @@ export interface Props {
theme?: ThemeParam
}
interface MergeObject {
export interface MergeObject {
[key: string]: any
}
const isObject = (target: any) => target && typeof target === 'object'
export const isObject = (target: any) => target && typeof target === 'object'
export const deepMergeObject = <T extends MergeObject,>(source: T, target: T): T => {
if (!isObject(target) || !isObject(source)) return source