How to use the ipyvuetify.ExpansionPanel function in ipyvuetify

To help you get started, we’ve selected a few ipyvuetify examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github glue-viz / glue-jupyter / glue_jupyter / vuetify_layout.py View on Github external
def vuetify_layout_factory(viewer):

    def on_click(widget, event, data):
        drawer.v_model = not drawer.v_model

    sidebar_button = v.AppBarNavIcon()
    sidebar_button.on_event('click', on_click)

    options_panel = v.ExpansionPanels(
        v_model=[0, 1], multiple=True, accordion=True, style_='padding-left: 1px; min-width: 200px',
        children=[
            v.ExpansionPanel(children=[
                v.ExpansionPanelHeader(class_='font-weight-bold', children=['Viewer Options']),
                v.ExpansionPanelContent(children=[viewer.viewer_options])]),
            v.ExpansionPanel(children=[
                v.ExpansionPanelHeader(class_='font-weight-bold', children=['Layer Options']),
                v.ExpansionPanelContent(children=[viewer.layer_options])])])

    drawer = v.NavigationDrawer(v_model=False, absolute=True, right=True,
                                children=[sidebar_button,
                                          options_panel], width="min-content")

    toolbar = v.Toolbar(dense=True, class_='elevation-0',
                        children=[v.ToolbarItems(children=[viewer.toolbar_selection_tools,
                                                           viewer.toolbar_selection_mode,
                                                           viewer.toolbar_active_subset]),
                                  v.Spacer(),
                                  sidebar_button])

    layout = v.Html(tag='div', children=[
        toolbar,
github glue-viz / glue-jupyter / glue_jupyter / vuetify_layout.py View on Github external
def vuetify_layout_factory(viewer):

    def on_click(widget, event, data):
        drawer.v_model = not drawer.v_model

    sidebar_button = v.AppBarNavIcon()
    sidebar_button.on_event('click', on_click)

    options_panel = v.ExpansionPanels(
        v_model=[0, 1], multiple=True, accordion=True, style_='padding-left: 1px; min-width: 200px',
        children=[
            v.ExpansionPanel(children=[
                v.ExpansionPanelHeader(class_='font-weight-bold', children=['Viewer Options']),
                v.ExpansionPanelContent(children=[viewer.viewer_options])]),
            v.ExpansionPanel(children=[
                v.ExpansionPanelHeader(class_='font-weight-bold', children=['Layer Options']),
                v.ExpansionPanelContent(children=[viewer.layer_options])])])

    drawer = v.NavigationDrawer(v_model=False, absolute=True, right=True,
                                children=[sidebar_button,
                                          options_panel], width="min-content")

    toolbar = v.Toolbar(dense=True, class_='elevation-0',
                        children=[v.ToolbarItems(children=[viewer.toolbar_selection_tools,
                                                           viewer.toolbar_selection_mode,
                                                           viewer.toolbar_active_subset]),
                                  v.Spacer(),
                                  sidebar_button])