@@ -57,7 +57,7 @@ const SingleProduct = ({ product }: IProductRootObject) => {
57
57
< LoadingSpinner />
58
58
</ div >
59
59
) : (
60
- < div className = "container flex flex-wrap items-center pt-4 pb-12 mx-auto " >
60
+ < div className = "container flex flex-wrap items-center pt-4 pb-12 mx-auto" >
61
61
< div className = "grid grid-cols-1 gap-4 md:mt-16 lg:grid-cols-2 xl:grid-cols-2 md:grid-cols-2 sm:grid-cols-2" >
62
62
{ image && (
63
63
< img
@@ -78,47 +78,44 @@ const SingleProduct = ({ product }: IProductRootObject) => {
78
78
className = "h-auto p-8 transition duration-500 ease-in-out transform xl:p-2 md:p-2 lg:p-2 md:hover:grow md:hover:shadow-lg md:hover:scale-105"
79
79
/>
80
80
) }
81
- < div className = "ml-8" >
82
- < p className = "text-3xl font-bold text-center md:text-left" >
81
+ < div className = "px-4 md: ml-8" >
82
+ < h1 className = "text-3xl font-bold text-center md:text-left mb-4 " >
83
83
{ name }
84
- </ p >
85
- < br />
84
+ </ h1 >
86
85
{ /* Display sale price when on sale */ }
87
86
{ onSale && (
88
- < div className = "flex" >
89
- < p className = "pt-1 mt-4 text-3xl text-gray-900 " >
87
+ < div className = "flex flex-col md:flex-row items-center md:items-start mb-4 " >
88
+ < p className = "text-3xl font-bold text-red-600 " >
90
89
{ product . variations && filteredVariantPrice ( price , '' ) }
91
90
{ ! product . variations && salePrice }
92
91
</ p >
93
- < p className = "pt-1 pl-8 mt-4 text-2xl text-gray-900 line-through" >
92
+ < p className = "text-xl text-gray-500 line-through md:ml-4 " >
94
93
{ product . variations && filteredVariantPrice ( price , 'right' ) }
95
94
{ ! product . variations && regularPrice }
96
95
</ p >
97
96
</ div >
98
97
) }
99
98
{ /* Display regular price when not on sale */ }
100
99
{ ! onSale && (
101
- < p className = "pt-1 mt-4 text-2xl text-gray-900" > { price } </ p >
100
+ < p className = "text-2xl font-bold mb-4" > { price } </ p >
102
101
) }
103
- < br />
104
- < p className = "pt-1 mt-4 text-2xl text-gray-900" >
105
- { DESCRIPTION_WITHOUT_HTML }
106
- </ p >
102
+ < p className = "text-lg mb-4" > { DESCRIPTION_WITHOUT_HTML } </ p >
107
103
{ Boolean ( product . stockQuantity ) && (
108
- < p
109
- v-if = "data.product.stockQuantity"
110
- className = "pt-1 mt-4 mb-4 text-2xl text-gray-900"
111
- >
112
- { product . stockQuantity } på lager
113
- </ p >
104
+ < div className = "mb-4 p-2 bg-green-100 border border-green-400 rounded-lg" >
105
+ < p className = "text-lg text-green-700 font-semibold" >
106
+ { product . stockQuantity } på lager
107
+ </ p >
108
+ </ div >
114
109
) }
115
110
{ product . variations && (
116
- < p className = "pt-1 mt-4 text-xl text-gray-900" >
117
- < span className = "py-2" > Varianter</ span >
111
+ < div className = "mb-4" >
112
+ < label htmlFor = "variant" className = "block text-lg font-medium mb-2" >
113
+ Varianter
114
+ </ label >
118
115
< select
119
116
id = "variant"
120
117
name = "variant"
121
- className = "block w-80 px-6 py-2 bg-white border border-gray-500 rounded-lg focus:outline-none focus:shadow-outline "
118
+ className = "block w-full px-4 py-2 bg-white border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 "
122
119
onChange = { ( e ) => {
123
120
setSelectedVariation ( Number ( e . target . value ) ) ;
124
121
} }
@@ -135,9 +132,9 @@ const SingleProduct = ({ product }: IProductRootObject) => {
135
132
} ,
136
133
) }
137
134
</ select >
138
- </ p >
135
+ </ div >
139
136
) }
140
- < div className = "pt-1 mt-2 " >
137
+ < div className = "w-full " >
141
138
{ product . variations && (
142
139
< AddToCart
143
140
product = { product }
0 commit comments