Skip to content

Commit edb5684

Browse files
committed
Document default slots
1 parent 1df3941 commit edb5684

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
⚠️ Warning: this project is in development stage, you should not
2+
use it in production.
3+
14
# Phug Component
25

36
Extension for Pug-php and Phug to use components in templates
@@ -57,3 +60,38 @@ Output:
5760
</div>
5861
</section>
5962
```
63+
64+
### Default slots
65+
66+
```pug
67+
component page
68+
header
69+
slot header
70+
| Default header
71+
72+
slot
73+
74+
footer
75+
slot footer
76+
| Default footer
77+
78+
+page
79+
| My page content
80+
81+
slot footer
82+
| Custom footer
83+
```
84+
85+
Output:
86+
87+
```html
88+
<header>
89+
Default header
90+
</header>
91+
92+
My page content
93+
94+
<footer>
95+
Custom footer
96+
</footer>
97+
```

0 commit comments

Comments
 (0)