Skip to content

Commit 966ec67

Browse files
committed
refactor(tsx): convert Styles to ts
1 parent 1f84a62 commit 966ec67

File tree

3 files changed

+23
-308
lines changed

3 files changed

+23
-308
lines changed

src/ui/assets/jss/material-dashboard-react.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const container = {
6060

6161
const defaultFont = {
6262
fontFamily: '"Roboto", "Helvetica", "Arial", sans-serif',
63-
fontWeight: '300',
63+
fontWeight: 300,
6464
lineHeight: '1.5em',
6565
};
6666

src/ui/assets/jss/material-dashboard-react/components/customTabsStyle.js renamed to src/ui/assets/jss/material-dashboard-react/components/customTabsStyle.ts

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
1-
import { hexToRgb, whiteColor } from '../../material-dashboard-react.js';
1+
import { hexToRgb, whiteColor } from '../../material-dashboard-react';
22

3-
const customTabsStyle = {
3+
interface CustomTabsStyle {
4+
cardTitle: React.CSSProperties;
5+
cardTitleRTL: React.CSSProperties;
6+
displayNone: React.CSSProperties;
7+
tabsRoot: React.CSSProperties & {
8+
'& $tabRootButton': React.CSSProperties;
9+
};
10+
tabRootButton: React.CSSProperties & {
11+
'&:last-child': React.CSSProperties;
12+
};
13+
tabSelected: React.CSSProperties;
14+
tabWrapper: React.CSSProperties & {
15+
'& > svg, & > .material-icons': React.CSSProperties;
16+
};
17+
}
18+
19+
const customTabsStyle: CustomTabsStyle = {
420
cardTitle: {
521
float: 'left',
622
padding: '10px 10px 10px 0px',
@@ -31,14 +47,14 @@ const customTabsStyle = {
3147
borderRadius: '3px',
3248
lineHeight: '24px',
3349
border: '0 !important',
34-
color: whiteColor + ' !important',
50+
color: `${whiteColor} !important`,
3551
marginLeft: '4px',
3652
'&:last-child': {
3753
marginLeft: '0px',
3854
},
3955
},
4056
tabSelected: {
41-
backgroundColor: 'rgba(' + hexToRgb(whiteColor) + ', 0.2)',
57+
backgroundColor: `rgba(${hexToRgb(whiteColor)}, 0.2)`,
4258
transition: '0.2s background-color 0.1s',
4359
},
4460
tabWrapper: {
@@ -52,11 +68,11 @@ const customTabsStyle = {
5268
fontWeight: '500',
5369
fontSize: '12px',
5470
marginTop: '1px',
55-
'& > svg,& > .material-icons': {
71+
'& > svg, & > .material-icons': {
5672
verticalAlign: 'middle',
5773
margin: '-1px 5px 0 0 !important',
5874
},
5975
},
6076
};
6177

62-
export default customTabsStyle;
78+
export default customTabsStyle;

src/ui/assets/jss/material-dashboard-react/components/sidebarStyle.js

Lines changed: 0 additions & 301 deletions
This file was deleted.

0 commit comments

Comments
 (0)