File tree Expand file tree Collapse file tree 4 files changed +21
-15
lines changed
components/recipe-form/steps Expand file tree Collapse file tree 4 files changed +21
-15
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ export function Steps(props: StepsProps) {
41
41
< FieldArray of = { store } name = "steps" >
42
42
{ ( fieldArray ) => (
43
43
fieldArray . items . value . map ( ( item , idx ) => (
44
- < li key = { item } class = { `${ styles . step } ${ styles . numbered } ` } >
44
+ < li key = { item } class = { `${ styles . step } numbered` } >
45
45
< Field of = { store } name = { `steps.${ idx } .description` } >
46
46
{ ( field , props ) => (
47
47
< textarea
Original file line number Diff line number Diff line change @@ -175,3 +175,22 @@ input[type="number"]::-webkit-inner-spin-button {
175
175
background-color : var (--accent-red );
176
176
}
177
177
}
178
+
179
+ .numbered {
180
+ --number-size : 1.5rem ;
181
+ counter-increment : stepsCounter 1 ;
182
+
183
+ & : before {
184
+ flex-shrink : 0 ;
185
+ display : inline-flex;
186
+ align-items : center;
187
+ justify-content : center;
188
+ height : var (--number-size );
189
+ width : var (--number-size );
190
+ background-color : var (--accent-cyan );
191
+ color : white;
192
+ font-weight : bold;
193
+ border-radius : 50vh ;
194
+ content : counter (stepsCounter);
195
+ }
196
+ }
Original file line number Diff line number Diff line change 57
57
align-items : center;
58
58
gap : 0.5rem ;
59
59
text-wrap : pretty;
60
-
61
- & : before {
62
- display : inline-flex;
63
- align-items : center;
64
- justify-content : center;
65
- height : var (--number-size );
66
- width : var (--number-size );
67
- color : white;
68
- background-color : var (--accent-cyan );
69
- font-weight : bold;
70
- border-radius : 50vh ;
71
- content : counter (stepsCounter);
72
- }
73
60
}
74
61
75
62
.actions {
Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ export function RecipeView() {
109
109
110
110
< ol class = { styles . stepsList } >
111
111
{ recipeState . data . steps ?. map ( ( item , idx ) => (
112
- < li key = { idx } class = { styles . step } >
112
+ < li key = { idx } class = { ` ${ styles . step } numbered` } >
113
113
{ item . description }
114
114
</ li >
115
115
) ) }
You can’t perform that action at this time.
0 commit comments