From c38343928c200aa89d0e6c0ab62e50d2e73b1807 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20Stenstr=C3=B6m?= Date: Sat, 6 Jun 2020 09:17:20 +0200 Subject: [PATCH] Add more examples in README. --- README.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7662f7f4..a75c1a8c 100644 --- a/README.md +++ b/README.md @@ -173,7 +173,21 @@ When using the component, you specify what slots you want to fill and where you {% endcomponent_block %} ``` -Since to header block is unspecified, it's taken from the base template. +Since to header block is unspecified, it's taken from the base template. If you put this in a template, and send in date=2020-06-06, this is what's rendered: + +```html +
+
+ Calendar header +
+
+ Today's date is 2020-06-06 +
+
+ +``` + +As you can see, component slots lets you write reusable containers, that you fill out when you use a component. This makes for highly reusable components, that can be used in different circumstances. # Running the tests