mirror of
https://github.com/wrabit/django-cotton.git
synced 2025-08-04 15:18:20 +00:00
added docs about the new 'only' attribute
This commit is contained in:
parent
33244c82b6
commit
4246f390a4
2 changed files with 8 additions and 3 deletions
|
@ -10,6 +10,7 @@
|
|||
<c-index-sublink><a href="#vars" class="no-underline">Local state with {{ '<c-vars>'|force_escape }}</a></c-index-sublink>
|
||||
<c-index-sublink><a href="#boolean-attributes" class="no-underline">Boolean Attributes</a></c-index-sublink>
|
||||
<c-index-sublink><a href="#dynamic-components" class="no-underline">Dynamic Components</a></c-index-sublink>
|
||||
<c-index-sublink><a href="#context-isolation" class="no-underline">Context Isolation</a></c-index-sublink>
|
||||
<c-index-sublink><a href="#summary" class="no-underline">Summary of concepts</a></c-index-sublink>
|
||||
</c-slot>
|
||||
|
||||
|
@ -321,6 +322,12 @@ context = { 'today': Weather.objects.get(...) }
|
|||
|
||||
<c-hr />
|
||||
|
||||
<h2 id="context-isolation">9. Extras</h2>
|
||||
|
||||
<p>Similar to Django's <c-highlight>{% verbatim %}{% include %}{% endverbatim %}</c-highlight> tag you can add an "<c-highlight>only</c-highlight>" attribute which will prevent the component from inheriting the parent's context.</p>
|
||||
|
||||
<c-hr />
|
||||
|
||||
<h2 id="summary">Summary of Concepts</h2>
|
||||
<ul>
|
||||
<li><c-highlight>{% verbatim %}{{ slot }}{% endverbatim %}</c-highlight> - Default content injection.</li>
|
||||
|
|
|
@ -1,3 +1 @@
|
|||
<span class="mr-1 font-bold dark:text-white text-[#1a384a] font-semibold border-b-2 border-teal-600 border-opacity-70">
|
||||
{{ slot }}
|
||||
</span>
|
||||
<span class="font-bold dark:text-white text-[#1a384a] font-semibold border-b-2 border-teal-600 border-opacity-70">{{ slot }}</span>
|
Loading…
Add table
Add a link
Reference in a new issue