fhdaisy.core

Builder API used behind the scenes to create the basic components

The basics


source

mk_previewer

 mk_previewer (app=None, cls='max-w-lg')
p = mk_previewer()
c = Button('Hey there', cls='btn')
p(c)
print(c)
<button class="btn">Hey there</button>

Creating simple components


source

hyphens2camel

 hyphens2camel (x)

source

mk_compfn

 mk_compfn (compcls, tag=None, name=None, xcls='', **compkw)
mk_compfn('btn', 'Button')
c = Btn('Hey there', cls='-primary p-5 text-2xl rounded-full')
print(c)
<button class="btn btn-primary p-5 text-2xl rounded-full ">Hey there</button>
p(c)