From 655bca1d7081fc618ce00a28253e1dcf172b8d73 Mon Sep 17 00:00:00 2001 From: Mazel Date: Fri, 30 Dec 2022 13:02:30 +0100 Subject: [PATCH] docs: add type description of hero image (#1691) Co-authored-by: Divyansh Singh <40380293+brc-dd@users.noreply.github.com> --- docs/guide/theme-home-page.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/guide/theme-home-page.md b/docs/guide/theme-home-page.md index 6f770e18d4df..498af6e18eae 100644 --- a/docs/guide/theme-home-page.md +++ b/docs/guide/theme-home-page.md @@ -48,10 +48,18 @@ interface Hero { // Tagline displayed below `text`. tagline?: string + // The image is displayed next to the text and tagline area. + image?: ThemeableImage + // Action buttons to display in home hero section. actions?: HeroAction[] } +type ThemeableImage = + | string + | { src: string; alt?: string } + | { light: string; dark: string; alt?: string } + interface HeroAction { // Color theme of the button. Defaults to `brand`. theme?: 'brand' | 'alt'