184 lines
8.9 KiB
Vue
184 lines
8.9 KiB
Vue
<template>
|
|
<DocSectionText v-bind="$attrs">
|
|
<p>When <i>linear</i> property is present, current step must be completed in order to move to the next step.</p>
|
|
</DocSectionText>
|
|
<div class="card flex justify-center">
|
|
<Stepper linear>
|
|
<StepperPanel header="Header I">
|
|
<template #content="{ nextCallback }">
|
|
<div class="flex flex-col h-48">
|
|
<div class="border-2 border-dashed border-surface-200 dark:border-surface-700 rounded bg-surface-50 dark:bg-surface-950 flex-auto flex justify-center items-center font-medium">Content I</div>
|
|
</div>
|
|
<div class="flex pt-6 justify-end">
|
|
<Button label="Next" icon="pi pi-arrow-right" iconPos="right" @click="nextCallback" />
|
|
</div>
|
|
</template>
|
|
</StepperPanel>
|
|
<StepperPanel header="Header II">
|
|
<template #content="{ prevCallback, nextCallback }">
|
|
<div class="flex flex-col h-48">
|
|
<div class="border-2 border-dashed border-surface-200 dark:border-surface-700 rounded bg-surface-50 dark:bg-surface-950 flex-auto flex justify-center items-center font-medium">Content II</div>
|
|
</div>
|
|
<div class="flex pt-6 justify-between">
|
|
<Button label="Back" severity="secondary" icon="pi pi-arrow-left" @click="prevCallback" />
|
|
<Button label="Next" icon="pi pi-arrow-right" iconPos="right" @click="nextCallback" />
|
|
</div>
|
|
</template>
|
|
</StepperPanel>
|
|
<StepperPanel header="Header III">
|
|
<template #content="{ prevCallback }">
|
|
<div class="flex flex-col h-48">
|
|
<div class="border-2 border-dashed border-surface-200 dark:border-surface-700 rounded bg-surface-50 dark:bg-surface-950 flex-auto flex justify-center items-center font-medium">Content III</div>
|
|
</div>
|
|
<div class="flex pt-6 justify-start">
|
|
<Button label="Back" severity="secondary" icon="pi pi-arrow-left" @click="prevCallback" />
|
|
</div>
|
|
</template>
|
|
</StepperPanel>
|
|
</Stepper>
|
|
</div>
|
|
<DocSectionCode :code="code" />
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
code: {
|
|
basic: `
|
|
<Stepper linear>
|
|
<StepperPanel header="Header I">
|
|
<template #content="{ nextCallback }">
|
|
<div class="flex flex-col h-48">
|
|
<div class="border-2 border-dashed border-surface-200 dark:border-surface-700 rounded bg-surface-50 dark:bg-surface-950 flex-auto flex justify-center items-center font-medium">Content I</div>
|
|
</div>
|
|
<div class="flex pt-6 justify-end">
|
|
<Button label="Next" icon="pi pi-arrow-right" iconPos="right" @click="nextCallback" />
|
|
</div>
|
|
</template>
|
|
</StepperPanel>
|
|
<StepperPanel header="Header II">
|
|
<template #content="{ prevCallback, nextCallback }">
|
|
<div class="flex flex-col h-48">
|
|
<div class="border-2 border-dashed border-surface-200 dark:border-surface-700 rounded bg-surface-50 dark:bg-surface-950 flex-auto flex justify-center items-center font-medium">Content II</div>
|
|
</div>
|
|
<div class="flex pt-6 justify-between">
|
|
<Button label="Back" severity="secondary" icon="pi pi-arrow-left" @click="prevCallback" />
|
|
<Button label="Next" icon="pi pi-arrow-right" iconPos="right" @click="nextCallback" />
|
|
</div>
|
|
</template>
|
|
</StepperPanel>
|
|
<StepperPanel header="Header III">
|
|
<template #content="{ prevCallback }">
|
|
<div class="flex flex-col h-48">
|
|
<div class="border-2 border-dashed border-surface-200 dark:border-surface-700 rounded bg-surface-50 dark:bg-surface-950 flex-auto flex justify-center items-center font-medium">Content III</div>
|
|
</div>
|
|
<div class="flex pt-6 justify-start">
|
|
<Button label="Back" severity="secondary" icon="pi pi-arrow-left" @click="prevCallback" />
|
|
</div>
|
|
</template>
|
|
</StepperPanel>
|
|
</Stepper>
|
|
`,
|
|
options: `
|
|
<template>
|
|
<div class="card flex justify-center">
|
|
<Stepper linear>
|
|
<StepperPanel header="Header I">
|
|
<template #content="{ nextCallback }">
|
|
<div class="flex flex-col h-48">
|
|
<div class="border-2 border-dashed border-surface-200 dark:border-surface-700 rounded bg-surface-50 dark:bg-surface-950 flex-auto flex justify-center items-center font-medium">Content I</div>
|
|
</div>
|
|
<div class="flex pt-6 justify-end">
|
|
<Button label="Next" icon="pi pi-arrow-right" iconPos="right" @click="nextCallback" />
|
|
</div>
|
|
</template>
|
|
</StepperPanel>
|
|
<StepperPanel header="Header II">
|
|
<template #content="{ prevCallback, nextCallback }">
|
|
<div class="flex flex-col h-48">
|
|
<div class="border-2 border-dashed border-surface-200 dark:border-surface-700 rounded bg-surface-50 dark:bg-surface-950 flex-auto flex justify-center items-center font-medium">Content II</div>
|
|
</div>
|
|
<div class="flex pt-6 justify-between">
|
|
<Button label="Back" severity="secondary" icon="pi pi-arrow-left" @click="prevCallback" />
|
|
<Button label="Next" icon="pi pi-arrow-right" iconPos="right" @click="nextCallback" />
|
|
</div>
|
|
</template>
|
|
</StepperPanel>
|
|
<StepperPanel header="Header III">
|
|
<template #content="{ prevCallback }">
|
|
<div class="flex flex-col h-48">
|
|
<div class="border-2 border-dashed border-surface-200 dark:border-surface-700 rounded bg-surface-50 dark:bg-surface-950 flex-auto flex justify-center items-center font-medium">Content III</div>
|
|
</div>
|
|
<div class="flex pt-6 justify-start">
|
|
<Button label="Back" severity="secondary" icon="pi pi-arrow-left" @click="prevCallback" />
|
|
</div>
|
|
</template>
|
|
</StepperPanel>
|
|
</Stepper>
|
|
</div>
|
|
</template>
|
|
|
|
<style scoped>
|
|
.p-stepper {
|
|
flex-basis: 50rem;
|
|
}
|
|
<\/style>
|
|
`,
|
|
composition: `
|
|
<template>
|
|
<div class="card flex justify-center">
|
|
<Stepper linear>
|
|
<StepperPanel header="Header I">
|
|
<template #content="{ nextCallback }">
|
|
<div class="flex flex-col h-48">
|
|
<div class="border-2 border-dashed border-surface-200 dark:border-surface-700 rounded bg-surface-50 dark:bg-surface-950 flex-auto flex justify-center items-center font-medium">Content I</div>
|
|
</div>
|
|
<div class="flex pt-6 justify-end">
|
|
<Button label="Next" icon="pi pi-arrow-right" iconPos="right" @click="nextCallback" />
|
|
</div>
|
|
</template>
|
|
</StepperPanel>
|
|
<StepperPanel header="Header II">
|
|
<template #content="{ prevCallback, nextCallback }">
|
|
<div class="flex flex-col h-48">
|
|
<div class="border-2 border-dashed border-surface-200 dark:border-surface-700 rounded bg-surface-50 dark:bg-surface-950 flex-auto flex justify-center items-center font-medium">Content II</div>
|
|
</div>
|
|
<div class="flex pt-6 justify-between">
|
|
<Button label="Back" severity="secondary" icon="pi pi-arrow-left" @click="prevCallback" />
|
|
<Button label="Next" icon="pi pi-arrow-right" iconPos="right" @click="nextCallback" />
|
|
</div>
|
|
</template>
|
|
</StepperPanel>
|
|
<StepperPanel header="Header III">
|
|
<template #content="{ prevCallback }">
|
|
<div class="flex flex-col h-48">
|
|
<div class="border-2 border-dashed border-surface-200 dark:border-surface-700 rounded bg-surface-50 dark:bg-surface-950 flex-auto flex justify-center items-center font-medium">Content III</div>
|
|
</div>
|
|
<div class="flex pt-6 justify-start">
|
|
<Button label="Back" severity="secondary" icon="pi pi-arrow-left" @click="prevCallback" />
|
|
</div>
|
|
</template>
|
|
</StepperPanel>
|
|
</Stepper>
|
|
</div>
|
|
</template>
|
|
|
|
<style scoped>
|
|
.p-stepper {
|
|
flex-basis: 50rem;
|
|
}
|
|
<\/style>
|
|
`
|
|
}
|
|
};
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<style scoped>
|
|
.p-stepper {
|
|
flex-basis: 50rem;
|
|
}
|
|
</style>
|