Skip to content

Commit

Permalink
zauberzeug#107: renamed div into container
Browse files Browse the repository at this point in the history
  • Loading branch information
hroemer committed Nov 2, 2022
1 parent fb15587 commit 7b98795
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions api_docs_and_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

from nicegui import ui
from nicegui.auto_context import Context
from nicegui.elements.div import Div
from nicegui.task_logger import create_task

REGEX_H4 = re.compile(r'<h4.*?>(.*?)</h4>')
Expand Down Expand Up @@ -562,7 +561,7 @@ def progress(self) -> int:
ui.number().bind_value(demo, 'number')

with ui.linear_progress(target_object=demo, target_name='progress_float'):
with ui.div(classes='absolute-full flex flex-center'):
with ui.container(classes='absolute-full flex flex-center'):
lbl = ui.label(text='number').classes('text-center text-subtitle2 text-white')
lbl.bind_text_from(demo, 'progress')

Expand Down
2 changes: 1 addition & 1 deletion nicegui/elements/div.py → nicegui/elements/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from ..auto_context import ContextMixin


class Div(Element, ContextMixin):
class Container(Element, ContextMixin):

def __init__(self, **kwargs):
"""QDiv Container"""
Expand Down
2 changes: 1 addition & 1 deletion nicegui/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ class Ui:
from .elements.color_picker import ColorPicker as color_picker
from .elements.colors import Colors as colors
from .elements.column import Column as column
from .elements.container import Container as container
from .elements.dialog import Dialog as dialog
from .elements.div import Div as div
from .elements.expansion import Expansion as expansion
from .elements.html import Html as html
from .elements.icon import Icon as icon
Expand Down

0 comments on commit 7b98795

Please sign in to comment.