Sidenav Item module

This commit is contained in:
Andrew Croce
2018-07-20 08:23:19 -04:00
parent 305877d953
commit 6ebbdfc64d
2 changed files with 18 additions and 0 deletions

View File

@@ -5,3 +5,12 @@ class Icon(UIModule):
with open('static/icons/%s.svg' % name) as svg:
return self.render_string(
"components/icon.html.to", svg=svg.read(), name=name, classes=classes)
class SidenavItem(UIModule):
def render(self, label, href, active=False, icon=None):
return self.render_string(
"navigation/_sidenav_item.html.to",
label=label,
href=href,
active=active,
icon=icon)