geist-ui icon indicating copy to clipboard operation
geist-ui copied to clipboard

about theme add extend extendFromLight extendFromDark api

Open tolerance-go opened this issue 1 year ago • 0 comments

Feature request 🚀

  • [ ] I will create Pull Request
  • [x] It's just a suggestion

Expected

I want to extend some fields on the existing theme and extend the theme name

Examples

export interface LayoutThemes extends GeistUIThemes {
    layout: GeistUIThemes['layout'] & {
        layoutContentWidth: string
        headerHeight: string
    }
}

const baseThemeVars: DeepPartial<LayoutThemes> = {
    layout: {
        layoutContentWidth: '1200px',
        headerHeight: '64px',
    },
}

const lightTheme = Themes.extendFromLight({
    type: 'light-extra',
    ...baseThemeVars,
})

const darkTheme = Themes.extendFromDark({
    type: 'dark-extra',
    ...baseThemeVars,
})

Programme (Optional)

Others (Optional)

tolerance-go avatar Oct 16 '22 00:10 tolerance-go