Skip to content

Commit 6a489e8

Browse files
committed
chore: revamp the styles customization and update to Dart Sass syntax
1 parent 894d2be commit 6a489e8

File tree

17 files changed

+91
-362
lines changed

17 files changed

+91
-362
lines changed

examples/kendo-react-finance-portfolio/public/404.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
</script>
3939
</head>
4040

41-
<body>
41+
<body className="k-body">
4242
</body>
4343

4444
</html>

examples/kendo-react-finance-portfolio/public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<title>React App</title>
2626
</head>
2727

28-
<body>
28+
<body className="k-body">
2929
<noscript>You need to enable JavaScript to run this app.</noscript>
3030
<div id="root"></div>
3131
<!--

examples/kendo-react-finance-portfolio/src/components/AddRemoveSymbol/AddRemoveSymbol.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { SymbolsContext } from '../../context/SymbolsContext';
77
import { SectorContext } from '../../context/SectorContext';
88
import { filterBy } from "@progress/kendo-data-query";
99
import styles from './add.module.scss';
10+
import { plusIcon, trashIcon } from '@progress/kendo-svg-icons';
1011

1112
export interface AddRemoveSymbolProps {
1213
className?: string;
@@ -31,6 +32,7 @@ const customItemRender = (el: any, value: any) => (
3132
const customValueRender = (el: any) => (
3233
<el.type
3334
{...el.props}
35+
style={{paddingInline: 0}}
3436
>
3537
Add new
3638
</el.type>)
@@ -81,9 +83,8 @@ export const AddRemoveSymbol = (props: AddRemoveSymbolProps) => {
8183
return (
8284
<div className={classNames(props.className)}>
8385
<DropDownList
84-
iconClassName="k-icon k-i-add k-icon-before"
85-
style={{ backgroundColor: 'white', width: "110px" }}
86-
className="dropdown-icon-before"
86+
svgIcon={plusIcon}
87+
style={{ backgroundColor: 'white', width: "110px", flexDirection: 'row-reverse' }}
8788
value={null}
8889
onChange={handleSymbolsAdd}
8990
data={filterBy(allSymbols, {
@@ -104,7 +105,7 @@ export const AddRemoveSymbol = (props: AddRemoveSymbolProps) => {
104105
/>
105106

106107
&nbsp;
107-
<Button iconClass='k-icon k-i-delete' fillMode={"flat"} style={{ color: '#D9534F' }} onClick={handleRemoveClick}>Remove</Button>
108+
<Button svgIcon={trashIcon} fillMode={"flat"} style={{ color: '#D9534F' }} onClick={handleRemoveClick}>Remove</Button>
108109

109110
</div>
110111
)
Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +0,0 @@
1-
@import "../../styles/variables";
2-
3-
.stock-item {
4-
padding-top: 1rem;
5-
padding-bottom: 1rem;
6-
cursor: pointer;
7-
&:hover {
8-
background-color: $hover-bg;
9-
}
10-
}
11-
12-
.stock-item-symbol {
13-
line-height: 1;
14-
display: block;
15-
font-size: 14px;
16-
color: $primary;
17-
}
18-
19-
.stock-item-name {
20-
line-height: 1;
21-
display: block;
22-
23-
font-size: 11px;
24-
color: $text-light;
25-
}

examples/kendo-react-finance-portfolio/src/components/Header/Header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export const Header: React.FunctionComponent<any> = () => {
4545
<div className="container pt-4 pb-2">
4646
<div className="row">
4747
<div className="col-9">
48-
<h1 className="mb-0 header-title">My Stocks Portfolio</h1>
48+
<h1 className="k-h1 mb-0 header-title">My Stocks Portfolio</h1>
4949
<DropDownList
5050
popupSettings={{
5151
animate: {
Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,3 @@
1-
.list-item {
2-
color: black;
3-
&:hover {
4-
text-decoration: none;
5-
color: black;
6-
}
7-
8-
&.list-item-selected {
9-
font-weight: bold;
10-
position: relative;
11-
&::after {
12-
content: "";
13-
position: absolute;
14-
width: 100%;
15-
display: block;
16-
height: 0.25rem;
17-
background-color: #007bff;
18-
}
19-
}
20-
}
21-
22-
.ddl-list-item {
23-
svg path {
24-
fill: #007bff;
25-
}
26-
27-
&.k-selected {
28-
svg path {
29-
fill: white;
30-
}
31-
}
32-
}
331

342
.stock {
353
z-index: 1040;
@@ -39,5 +7,5 @@
397
font-size: 14px;
408
color: white;
419
font-weight: bold;
42-
transform: translateY(0.25rem);
10+
transform: translateY(0.35rem);
4311
}

examples/kendo-react-finance-portfolio/src/components/StockList/StockList.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import styles from './stock-list.module.scss';
1414
import { SectorContext } from '../../context/SectorContext';
1515
import { SymbolsContext } from '../../context/SymbolsContext';
1616
import { Symbol } from '../Stock/Symbol';
17+
import { classNames } from '@progress/kendo-react-common';
1718

1819

1920
export const StockList: React.FunctionComponent = () => {
@@ -106,14 +107,15 @@ export const StockList: React.FunctionComponent = () => {
106107
<>
107108
<Symbol symbol={symbol || 'SNAP'} data={data.find((i: any) => i.symbol === symbol) || data.find((i: any) => i.symbol === 'SNAP')} />
108109
<Grid
110+
className={classNames(styles["grid"])}
109111
data={processed}
110112
selectedField="selected"
111113
onSelectionChange={handleSelectionChange}
112114
onRowClick={handleRowClick}
113115
>
114116
<GridColumn field="selected" headerCell={_ => null} cell={CheckboxCell} width={40} />
115-
<GridColumn field="symbol" title="Symbol" className={styles['symbol-cell']} width={70} locked={true} />
116-
<GridColumn field="name" title="Name" className={styles['name-cell']} width={200} />
117+
<GridColumn field="symbol" title="Symbol" className={styles['symbol-cell']} width={75} />
118+
<GridColumn field="name" title="Name" className={styles['name-cell']} width={195} />
117119
<GridColumn field="price" title="Price" className={styles['price-cell']} cell={PriceCell} headerCell={PriceHeaderCell} width={80} />
118120
<GridColumn field="day_change" title="Change" cell={ChangeCell} width={80} />
119121
<GridColumn field="change_pct" title="% Change" cell={ChangeCell} width={90} />

examples/kendo-react-finance-portfolio/src/components/StockList/stock-list.module.scss

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
@import "../../styles/variables";
1+
$negative-value: #d9534f;
2+
$positive-value: #5cb85c;
23

34
.symbol-cell {
4-
color: $primary;
5+
color: #55595c;
56
font-weight: bold !important;
67
}
78

89
.name-cell {
9-
color: $text-base;
10+
color: #373a3c;
1011
}
1112

1213
.price-cell {
@@ -28,3 +29,13 @@
2829
font-size: 11px;
2930
}
3031
}
32+
33+
.grid thead {
34+
background-color: #eceeef !important;
35+
color: #55595c !important;
36+
line-height: 1;
37+
font-weight: bold !important;
38+
& > th {
39+
vertical-align: middle;
40+
}
41+
}

examples/kendo-react-finance-portfolio/src/components/User/user.module.scss

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
@import "../../styles/variables";
2-
31
.wrapper-profile {
42
background-color: white;
53
}
@@ -16,7 +14,7 @@
1614
}
1715

1816
.symbol-cell {
19-
color: $primary;
17+
color: #007BFF;
2018
font-weight: bold !important;
2119
}
2220

@@ -30,7 +28,7 @@
3028
padding-bottom: 1rem;
3129
}
3230
& > td:nth-child(1) {
33-
color: $text-light;
31+
color: #55595C;
3432
font-weight: 300;
3533
}
3634
& > td:nth-child(2) {

examples/kendo-react-finance-portfolio/src/pages/StockPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const StockPage = () => {
2121
<Stock />
2222
</div>
2323
</div>
24-
<div className={classNames("py-3")} style={{ minHeight: 600 }}>
24+
<div className={classNames(styles["stock-section"], "py-3")} style={{ minHeight: 600 }}>
2525
<div className={"container my-3"}>
2626
<NavigationRow className="row justify-content-center">
2727
<AddRemoveSymbol

0 commit comments

Comments
 (0)