mirror of
https://github.com/django-components/django-components.git
synced 2025-09-26 15:39:08 +00:00
parent
7a49a7806c
commit
f069255b64
12 changed files with 404 additions and 72 deletions
|
@ -513,7 +513,7 @@ Button.render(
|
|||
age=30,
|
||||
),
|
||||
slots=Button.Slots(
|
||||
footer=Slot(lambda *a, **kwa: "Click me!"),
|
||||
footer=Slot(lambda ctx: "Click me!"),
|
||||
),
|
||||
)
|
||||
```
|
||||
|
|
|
@ -128,7 +128,7 @@ Button.render(
|
|||
age=30,
|
||||
),
|
||||
slots=Button.Slots(
|
||||
footer=Slot(lambda *a, **kwa: "Click me!"),
|
||||
footer=Slot(lambda ctx: "Click me!"),
|
||||
),
|
||||
)
|
||||
```
|
||||
|
@ -601,7 +601,7 @@ Button.render(
|
|||
},
|
||||
slots={
|
||||
"my_slot": "...",
|
||||
"another_slot": Slot(lambda: ...),
|
||||
"another_slot": Slot(lambda ctx: ...),
|
||||
},
|
||||
)
|
||||
```
|
||||
|
@ -662,7 +662,7 @@ Button.render(
|
|||
),
|
||||
slots=Button.Slots(
|
||||
my_slot="...",
|
||||
another_slot=Slot(lambda: ...),
|
||||
another_slot=Slot(lambda ctx: ...),
|
||||
),
|
||||
)
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue