mirror of
https://github.com/django-components/django-components.git
synced 2025-08-31 03:07:19 +00:00
parent
7a49a7806c
commit
f069255b64
12 changed files with 404 additions and 72 deletions
|
@ -76,7 +76,7 @@ class TestComponentTyping:
|
|||
kwargs=Button.Kwargs(name="name", age=123),
|
||||
slots=Button.Slots(
|
||||
header="HEADER",
|
||||
footer=Slot(lambda ctx, slot_data, slot_ref: "FOOTER"),
|
||||
footer=Slot(lambda ctx: "FOOTER"),
|
||||
),
|
||||
)
|
||||
|
||||
|
@ -124,7 +124,7 @@ class TestComponentTyping:
|
|||
kwargs={"name": "name", "age": 123},
|
||||
slots={
|
||||
"header": "HEADER",
|
||||
"footer": Slot(lambda ctx, slot_data, slot_ref: "FOOTER"),
|
||||
"footer": Slot(lambda ctx: "FOOTER"),
|
||||
},
|
||||
)
|
||||
|
||||
|
@ -206,7 +206,7 @@ class TestComponentTyping:
|
|||
kwargs={"name": "name", "age": 123},
|
||||
slots={
|
||||
"header": "HEADER",
|
||||
"footer": Slot(lambda ctx, slot_data, slot_ref: "FOOTER"),
|
||||
"footer": Slot(lambda ctx: "FOOTER"),
|
||||
},
|
||||
)
|
||||
|
||||
|
@ -314,7 +314,7 @@ class TestComponentTyping:
|
|||
kwargs={"name": "name", "age": 123},
|
||||
slots={
|
||||
"header": "HEADER",
|
||||
"footer": Slot(lambda ctx, slot_data, slot_ref: "FOOTER"),
|
||||
"footer": Slot(lambda ctx: "FOOTER"),
|
||||
},
|
||||
)
|
||||
|
||||
|
@ -397,7 +397,7 @@ class TestComponentTyping:
|
|||
kwargs=Button.Kwargs(name="name", age=123),
|
||||
slots=Button.Slots(
|
||||
header="HEADER",
|
||||
footer=Slot(lambda ctx, slot_data, slot_ref: "FOOTER"),
|
||||
footer=Slot(lambda ctx: "FOOTER"),
|
||||
),
|
||||
)
|
||||
|
||||
|
@ -412,7 +412,7 @@ class TestComponentTyping:
|
|||
kwargs=Button.Kwargs(name="name", age=123),
|
||||
slots=Button.Slots(
|
||||
header="HEADER",
|
||||
footer=Slot(lambda ctx, slot_data, slot_ref: "FOOTER"),
|
||||
footer=Slot(lambda ctx: "FOOTER"),
|
||||
),
|
||||
)
|
||||
|
||||
|
@ -427,7 +427,7 @@ class TestComponentTyping:
|
|||
kwargs=Button.Kwargs(age=123), # type: ignore[call-arg]
|
||||
slots=Button.Slots(
|
||||
header="HEADER",
|
||||
footer=Slot(lambda ctx, slot_data, slot_ref: "FOOTER"),
|
||||
footer=Slot(lambda ctx: "FOOTER"),
|
||||
),
|
||||
)
|
||||
|
||||
|
@ -438,7 +438,7 @@ class TestComponentTyping:
|
|||
args=Button.Args(arg1="arg1", arg2="arg2"),
|
||||
kwargs=Button.Kwargs(name="name", age=123),
|
||||
slots=Button.Slots( # type: ignore[typeddict-item]
|
||||
footer=Slot(lambda ctx, slot_data, slot_ref: "FOOTER"), # Missing header
|
||||
footer=Slot(lambda ctx: "FOOTER"), # Missing header
|
||||
),
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue