Skip to content

Commit 87fc936

Browse files
committed
Refactor(scss): better Materialize-css sass file integration
1 parent b5c6f34 commit 87fc936

File tree

15 files changed

+47
-54
lines changed

15 files changed

+47
-54
lines changed

frontend/src/components/Footer/footer.scss

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

frontend/src/components/Footer/footer.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
import * as React from 'react';
22

3-
const styles = require('./footer.scss');
4-
53
export class Footer extends React.Component {
64
public render() {
75
return (
8-
<footer className={`page-footer ${styles.footer}`}>
6+
<footer className='page-footer'>
97
<div className='container'>
108
<div className='row'>
119
<div className='col l6 s12'>

frontend/src/components/Header/header.scss

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

frontend/src/components/Header/header.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ import { Link } from 'react-router-dom';
55
import { Dropdown } from 'components/Dropdown';
66
import { IGlobalState } from 'types/global';
77

8-
const styles = require('./header.scss');
9-
108
// Component
119

1210
interface IHeaderProps {
@@ -33,7 +31,7 @@ class HeaderComponent extends React.Component<IHeaderProps> {
3331
public render() {
3432
return (
3533
<div>
36-
<nav className={styles.header}>
34+
<nav>
3735
<div className='nav-wrapper'>
3836
<div className='container'>
3937
<a className='brand-logo'><Link to='/'>Logo</Link></a>

frontend/src/pages/HomePage/components/Carousel/carousel.scss

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

frontend/src/pages/HomePage/components/Carousel/carousel.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import * as React from 'react';
22

33
import { CAROUSEL_AUTOPLAY_INTERVAL, TOAST_DISPLAY_DURATION, TOOLTIP_DELAY_TIME } from './constants/carousel';
44

5-
const styles = require('./carousel.scss');
6-
75
const tooltipConfig: Partial<M.TooltipOptions> = {
86
enterDelay: TOOLTIP_DELAY_TIME,
97
position: 'top',
@@ -50,7 +48,7 @@ export class Carousel extends React.Component {
5048

5149
public render() {
5250
return (
53-
<div className={`carousel carousel-slider center z-depth-3 ${styles.carousel}`} data-indicators='true'>
51+
<div className='carousel carousel-slider center z-depth-3' data-indicators='true'>
5452
<div className='carousel-fixed-item center'>
5553
<a className='btn tooltipped waves-effect white grey-text text-darken-2' data-position={tooltipConfig.position} data-delay={tooltipConfig.enterDelay} data-tooltip={tooltipConfig.html} onClick={this.displayToast} role='button'>Focus me!</a>
5654
</div>
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
@import '../../homePage';
2-
31
.pushpin {
4-
@extend .home-page-block;
2+
height: 825px;
53
}
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
.home-page-block {
2-
height: 825px;
3-
width: 100%;
2+
height: 820px;
43
}

frontend/src/pages/ReactPage/components/FetchNote/fetchNote.scss

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,6 @@
55
@extend .react-block;
66
}
77

8-
@media only screen and (max-width: $small-screen-size) {
9-
.fetch-note-layout {
10-
.btn {
11-
width: 80%;
12-
max-width: 300px;
13-
}
14-
}
15-
}
16-
178
.fetch-note-title {
189
@extend .react-block-title;
1910
}
@@ -29,3 +20,10 @@
2920
.fetch-note-filter-btn {
3021
width: 30%;
3122
}
23+
24+
@media only screen and (max-width: $small-screen) {
25+
.fetch-note-filter-btn {
26+
width: 80%;
27+
max-width: 300px;
28+
}
29+
}

frontend/src/pages/ReactPage/components/FetchNote/fetchNote.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class FetchNoteComponent extends React.Component<IFetchNoteProps> {
4545
</li>
4646
),
4747
);
48-
const noteListCollection = <ul className={`collection ${styles['fetch-note-collection}']}`}> {noteList} </ul>;
48+
const noteListCollection = <ul className={`collection ${styles['fetch-note-collection']}`}> {noteList} </ul>;
4949
const errorPanel = (
5050
<div className={`card-panel red ${styles['fetch-note-error-panel']}`}>
5151
<span className='white-text'>{this.props.error}</span>

0 commit comments

Comments
 (0)