First Working version. I can add table
This commit is contained in:
0
src/components/dummy/__init__.py
Normal file
0
src/components/dummy/__init__.py
Normal file
31
src/components/dummy/components/DummyComponent.py
Normal file
31
src/components/dummy/components/DummyComponent.py
Normal file
@@ -0,0 +1,31 @@
|
||||
from fasthtml.components import *
|
||||
|
||||
from components.BaseComponent import BaseComponent
|
||||
|
||||
|
||||
class DummyComponent(BaseComponent):
|
||||
def __init__(self, session, instance_id):
|
||||
super().__init__(session, instance_id)
|
||||
|
||||
def __ft__(self):
|
||||
return Div(
|
||||
Input(id='my-drawer', type='checkbox', cls='drawer-toggle'),
|
||||
Div(
|
||||
Label('Open drawer', fr='my-drawer', cls='btn btn-primary drawer-button'),
|
||||
cls='drawer-content'
|
||||
),
|
||||
Div(
|
||||
Label(fr='my-drawer', aria_label='close sidebar', cls='drawer-overlay'),
|
||||
Ul(
|
||||
Li(
|
||||
A('Sidebar Item 1')
|
||||
),
|
||||
Li(
|
||||
A('Sidebar Item 2')
|
||||
),
|
||||
cls='menu bg-base-200 text-base-content min-h-full w-80 p-4'
|
||||
),
|
||||
cls='drawer-side'
|
||||
),
|
||||
cls='drawer drawer-end'
|
||||
)
|
||||
0
src/components/dummy/components/__init__.py
Normal file
0
src/components/dummy/components/__init__.py
Normal file
Reference in New Issue
Block a user