mirror of
https://github.com/django-components/django-components.git
synced 2025-11-07 10:06:42 +00:00
refactor: make it optional having to specify parent class of Args, Kwargs, Slots, etc (#1466)
This commit is contained in:
parent
0aeb96fa40
commit
c37628dea0
34 changed files with 661 additions and 299 deletions
|
|
@ -1,6 +1,5 @@
|
|||
# ruff: noqa: S311
|
||||
import random
|
||||
from typing import NamedTuple
|
||||
|
||||
from django_components import Component, register, types
|
||||
|
||||
|
|
@ -9,7 +8,7 @@ DESCRIPTION = "A component that catches errors and displays fallback content, si
|
|||
|
||||
@register("weather_widget")
|
||||
class WeatherWidget(Component):
|
||||
class Kwargs(NamedTuple):
|
||||
class Kwargs:
|
||||
location: str
|
||||
simulate_error: bool = False
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue