From e436c02c075c359b27c32668a1e675cc2f291893 Mon Sep 17 00:00:00 2001 From: Lea Verou Date: Thu, 30 Jan 2025 16:19:40 -0800 Subject: [PATCH] =?UTF-8?q?First=20stab=20at=20`with-*`=20=E2=86=92=20`ssr?= =?UTF-8?q?-slots`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Infrastructure in base class - Sample implementation in Card - Docs --- docs/docs/components/card.md | 20 +++++----- docs/docs/experimental/ssr.md | 31 ++++++++++++++- src/components/card/card.css | 8 ++-- src/components/card/card.ts | 31 +++++++++------ src/internal/converters.ts | 18 +++++++++ src/internal/webawesome-element.ts | 60 ++++++++++++++++++++++++++++++ 6 files changed, 142 insertions(+), 26 deletions(-) create mode 100644 src/internal/converters.ts diff --git a/docs/docs/components/card.md b/docs/docs/components/card.md index 222e5b8d5..54b8ba6e3 100644 --- a/docs/docs/components/card.md +++ b/docs/docs/components/card.md @@ -6,7 +6,7 @@ icon: card --- ```html {.example} - + +
Header Title @@ -97,10 +97,10 @@ If using SSR, you need to also use the `with-header` attribute to add a header t ### Card with Footer Footers can be used to display actions, summaries, or other relevant content. -If using SSR, you need to also use the `with-footer` attribute to add a footer to the card (if not, it is added automatically). +If using SSR, you need to also use the `ssr-slots` attribute to add a footer to the card (if not, it is added automatically). ```html {.example} - + This card has a footer. You can put all sorts of things in it!
@@ -125,10 +125,10 @@ If using SSR, you need to also use the `with-footer` attribute to add a footer t ### Images Card images are displayed atop the card and will stretch to fit. -If using SSR, you need to also use the `with-image` attribute to add an image to the card (if not, it is added automatically). +If using SSR, you need to also use the `ssr-slots` attribute to add an image to the card (if not, it is added automatically). ```html {.example} - + - + This is a small card.
@@ -159,7 +159,7 @@ Use the `size` attribute to change a card's size.
- + This is a medium card (default).
@@ -168,7 +168,7 @@ Use the `size` attribute to change a card's size.
- + This is a large card.