import solara
from typing import Callable
# using https://github.com/widgetti/ipyvuetify/issues/182
# based on https://github.com/pulsardev/vue-tour
# and https://py.cafe/maartenbreddels/solara-howto-component-vue-B
steps = [
{
"target": '.v-step-0', # We're using document.querySelector() under the hood
"header": {
"title": 'Get Started',
},
"content": "Discover <strong>Vue Tour</strong>!"
},
{
"target": '.v-step-1',
"content": 'An awesome plugin made with Vue.js!'
},
{
"target": '.v-step-2',
"content": 'Try it, you\'ll love it!<br>You can put HTML in the steps and completely customize the DOM to suit your needs.',
"params": {
"placement": 'top' #Any valid Popper.js placement. See https://popper.js.org/popper-documentation.html#Popper.placements
}
}
]
@solara.component_vue("tour.vue")
def Tour(steps):
...
@solara.component
def Page():
Tour(steps=steps)
solara.Button("Button 1", classes=["v-step-0"])
with solara.Card("title", classes=["v-step-1"]):
solara.Button("Button 2", classes=["v-step-2"])