Skip to content

Commit a1b8ffc

Browse files
authored
Merge pull request #4 from SyncfusionExamples/EJ2-932646-UI-changes
932646: Enhancing the UI for a More Attractive Stock Management Application with tailwind3.
2 parents c08d58b + 06ccc82 commit a1b8ffc

File tree

4 files changed

+57
-15
lines changed

4 files changed

+57
-15
lines changed

Stock-Market-Application/src/components/MyPortfolio.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -236,14 +236,14 @@ export default function MyPortfolio(props: { changeMarquee: Function, myStockDm:
236236
title: 'Remove from Wishlist',
237237
buttonOption: {
238238
iconCss: 'removemywishlist e-icons',
239-
cssClass: 'e-flat',
239+
cssClass: 'e-warning',
240240
},
241241
},
242242
{
243243
title: 'Analysis',
244244
buttonOption: {
245245
iconCss: 'analysis e-icons',
246-
cssClass: 'e-flat',
246+
cssClass: 'e-primary',
247247
},
248248
},
249249
]}

Stock-Market-Application/src/components/Overview.tsx

+14-2
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,17 @@ export default function Overview(props: { changeMarquee: Function, myStockDm: Da
175175
let query: Query = new Query().where(Predicate.or(predicates));
176176
(props.myStockDm as any).persistQuery = query;
177177
props.myStockDm.setPersistData({} as any, 'myStocks', query);
178+
if (myWishList.length) {
179+
const myWishlistIcon = args.target.querySelector('.addmywishlist');
180+
if (myWishlistIcon) {
181+
myWishlistIcon.classList.remove('addmywishlist');
182+
myWishlistIcon.classList.add('addedmywishlist');
183+
}
184+
if (args.target.classList.contains('e-primary')) {
185+
args.target.classList.remove('e-primary');
186+
args.target.classList.add('e-success');
187+
}
188+
}
178189
}
179190
if (args.target!.querySelector('.analysis')) {
180191
navigate('/stock_analysis', {
@@ -233,6 +244,7 @@ export default function Overview(props: { changeMarquee: Function, myStockDm: Da
233244
enableHover={false}
234245
commandClick={commandClick}
235246
destroyed={destroyed}
247+
height={341}
236248
>
237249
<ColumnsDirective>
238250
<ColumnDirective
@@ -308,14 +320,14 @@ export default function Overview(props: { changeMarquee: Function, myStockDm: Da
308320
title: 'Add to Wishlist',
309321
buttonOption: {
310322
iconCss: 'addmywishlist e-icons',
311-
cssClass: 'e-flat',
323+
cssClass: 'e-primary' ,
312324
},
313325
},
314326
{
315327
title: 'Analysis',
316328
buttonOption: {
317329
iconCss: 'analysis e-icons',
318-
cssClass: 'e-flat',
330+
cssClass: 'e-primary',
319331
},
320332
},
321333
]}

Stock-Market-Application/src/components/SmartStockPicks.tsx

+15-3
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,17 @@ export default function SmartStockPicks(props: { myStockDm: DataManager }) {
159159
let query: Query = new Query().where(Predicate.or(predicates));
160160
(props.myStockDm as any).persistQuery = query;
161161
props.myStockDm.setPersistData({} as any, 'myStocks', query);
162+
if (myWishList.length) {
163+
const myWishlistIcon = args.target.querySelector('.addmywishlist');
164+
if (myWishlistIcon) {
165+
myWishlistIcon.classList.remove('addmywishlist');
166+
myWishlistIcon.classList.add('addedmywishlist');
167+
}
168+
if (args.target.classList.contains('e-primary')) {
169+
args.target.classList.remove('e-primary');
170+
args.target.classList.add('e-success');
171+
}
172+
}
162173
}
163174
if (args.target!.querySelector('.analysis')) {
164175
navigate('/stock_analysis', {
@@ -190,7 +201,8 @@ export default function SmartStockPicks(props: { myStockDm: DataManager }) {
190201
created={onGridCreated}
191202
queryCellInfo={queryCellInfo}
192203
commandClick={commandClick}
193-
pageSettings={{pageSize: 10}}
204+
pageSettings={{ pageCount: 4, pageSize: 10 }}
205+
height={341}
194206
>
195207
<ColumnsDirective>
196208
<ColumnDirective
@@ -265,14 +277,14 @@ export default function SmartStockPicks(props: { myStockDm: DataManager }) {
265277
title: 'Add to Wishlist',
266278
buttonOption: {
267279
iconCss: 'addmywishlist e-icons',
268-
cssClass: 'e-flat',
280+
cssClass: 'e-primary',
269281
},
270282
},
271283
{
272284
title: 'Analysis',
273285
buttonOption: {
274286
iconCss: 'analysis e-icons',
275-
cssClass: 'e-flat',
287+
cssClass: 'e-primary',
276288
},
277289
},
278290
]}

Stock-Market-Application/src/style.css

+26-8
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
content: '\e805';
44
}
55

6+
.addedmywishlist.e-icons::before {
7+
content: '\e774';
8+
}
9+
610
.removemywishlist.e-icons::before {
711
content: '\e87f';
812
}
@@ -18,6 +22,7 @@
1822
background-color: #151e28;
1923
padding: 10px 20px;
2024
border-bottom: 1px solid #2C2C2C;
25+
height: 65px;
2126
}
2227

2328
.nav-link {
@@ -27,7 +32,6 @@
2732
padding: 8px 15px;
2833
margin: 0 5px;
2934
border-radius: 4px;
30-
transition: background-color 0.3s ease, color 0.3s ease;
3135
}
3236

3337
.nav-link.active {
@@ -196,7 +200,6 @@
196200
/* main content */
197201

198202
.main-content {
199-
min-height: 600px;
200203
background-color: #FFFFFF;
201204
color: #000000;
202205
padding: 20px;
@@ -206,7 +209,7 @@
206209

207210
.stock-content-area {
208211
padding-left: 20px;
209-
min-height: 450px;
212+
min-height: 300px;
210213
background-color: #FFFFFF;
211214
border-radius: 4px;
212215
}
@@ -275,6 +278,7 @@
275278
.section1,
276279
.section2 {
277280
display: inline-block;
281+
max-height: calc(100% - 30px);
278282
}
279283

280284
.section1,
@@ -347,6 +351,7 @@ text#stockchartdefault_ChartTitle {
347351
.e-card .e-card-content {
348352
color: #333;
349353
padding: 0 16px 16px 16px;
354+
max-height: 60px;
350355
}
351356

352357
.e-card .e-card-actions {
@@ -390,12 +395,15 @@ text#stockchartdefault_ChartTitle {
390395

391396
/* Know More */
392397

398+
.control-pane .control-section.db-carousel-section {
399+
height: 530px;
400+
overflow-y: scroll;
401+
}
402+
393403
.db-carousel-section .carousel-sample {
394404
border-radius: 0.5em;
395405
margin: 0 auto 2em;
396406
max-width: 1000px;
397-
height: 550px;
398-
padding-top: 10px;
399407
}
400408

401409
.db-carousel {
@@ -443,19 +451,22 @@ text#stockchartdefault_ChartTitle {
443451

444452
@media screen and (min-width: 700px) {
445453
.e-card-content {
446-
min-height: 200px;
454+
min-height: 160px;
455+
max-height: 170px;
447456
}
448457
}
449458

450459
@media screen and (min-width: 800px) {
451460
.e-card-content {
452-
min-height: 150px;
461+
min-height: 130px;
462+
max-height: 140px;
453463
}
454464
}
455465

456466
@media screen and (min-width: 900px) {
457467
.e-card-content {
458-
min-height: 130px;
468+
min-height: 110px;
469+
max-height: 120px;
459470
}
460471
}
461472

@@ -467,6 +478,13 @@ text#stockchartdefault_ChartTitle {
467478
}
468479
}
469480

481+
@media screen and (max-width: 850px) {
482+
.nav-link.active,
483+
.nav-link:hover {
484+
background-color: transparent;
485+
}
486+
}
487+
470488
@media only screen and (max-width: 700px) {
471489

472490
/* Overview */

0 commit comments

Comments
 (0)