File tree Expand file tree Collapse file tree 4 files changed +24
-22
lines changed
storage/framework/core/components/stepper/src Expand file tree Collapse file tree 4 files changed +24
-22
lines changed Original file line number Diff line number Diff line change 1
1
<script lang="ts" setup>
2
2
import { Modal } from ' @stacksjs/modal'
3
- import { Stepper } from ' @stacksjs/stepper '
3
+ import Stepper from ' ./Stepper.vue '
4
4
import { ref } from ' vue'
5
5
6
6
const props = defineProps <{
@@ -23,7 +23,7 @@ function handleClose() {
23
23
<template >
24
24
<div class =" flex" >
25
25
<Modal close-button :visible =" props.visible" @close =" handleClose" >
26
- <div class =" mt-4 w-full flex flex-col " >
26
+ <div class =" mt-4" style = " width : 100 % ; " >
27
27
<Stepper ref =" stepperRef" v-model =" step" :steps =" steps" />
28
28
29
29
<div class =" flex-center my-4" >
@@ -56,19 +56,6 @@ function handleClose() {
56
56
</button >
57
57
</div >
58
58
</div >
59
-
60
- <!-- <div class="flex-center w-full">
61
-
62
- </div>
63
- <div class="flex-center" v-if="step === 1">
64
- <h1>Step 1</h1>
65
- </div>
66
- <div class="flex-center" v-if="step === 2">
67
- <h1>Step 2</h1>
68
- </div>
69
- <div class="flex-center" v-if="step === 3">
70
- <h1>Step 3</h1>
71
- </div> -->
72
59
</Modal >
73
60
</div >
74
61
</template >
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ function handleChange() {
64
64
</script >
65
65
66
66
<template >
67
- <div class =" step box-border flex-1 opacity-55 transition-opacity duration-700" :class =" [classes]" >
67
+ <div class =" step box-border flex-1 flex-row opacity-55 transition-opacity duration-700" :class =" [classes]" >
68
68
<input
69
69
v-show =" debug"
70
70
:id =" id"
@@ -89,13 +89,16 @@ function handleChange() {
89
89
<span v-if =" defaultSlot" class =" title text-white" >
90
90
<slot v-bind =" scope" />
91
91
</span >
92
- <span v-if =" withDivider && !isLastStep" class =" ml-2 w-full border-b border-gray shadow-md" />
93
- ss
92
+ <span v-if =" withDivider && !isLastStep" class =" ml-2 w-full shadow-md" >
93
+ <span class =" bg-gray h-1 block" />
94
+ </span >
94
95
</label >
95
96
</div >
96
97
</template >
97
98
98
99
<style scoped>
100
+ /* @unocss-placeholder */
101
+
99
102
.step :hover:not (.is-disabled ) {
100
103
opacity : 0.85 ;
101
104
}
@@ -129,6 +132,4 @@ function handleChange() {
129
132
margin-right : 0.5rem ; /* Assuming mr-2 maps to 0.5rem */
130
133
}
131
134
}
132
-
133
- /* @unocss-placeholder */
134
135
</style >
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ import Step from './Step.vue'
5
5
6
6
defineOptions ({
7
7
name: ' Stepper' ,
8
- inheritAttrs: false ,
9
8
})
10
9
11
10
const props = withDefaults (defineProps <StepperProps >(), {
@@ -197,7 +196,13 @@ defineExpose({
197
196
</script >
198
197
199
198
<template >
200
- <div class =" box-border w-full flex select-none justify-between" >
199
+ <div style ="
200
+ box-sizing : border-box ;
201
+ width : 100% ;
202
+ display : flex ;
203
+ justify-content : space-between ;
204
+ user-select : none ;
205
+ " >
201
206
<Step
202
207
v-for =" (step, $index) in stepsArr"
203
208
:key =" $index"
Original file line number Diff line number Diff line change
1
+ import type { Plugin } from 'vue'
1
2
import { Stepper } from './components'
2
3
4
+ const plugin : Plugin = {
5
+ install ( app ) {
6
+ app . component ( 'Stepper' , Stepper )
7
+ } ,
8
+ }
9
+
10
+ export default plugin
11
+
3
12
export { Stepper }
You can’t perform that action at this time.
0 commit comments