Skip to content

Commit 4bd22d0

Browse files
committed
Merge branch 'main' into jumbotron
2 parents 31f76c6 + 1a47e12 commit 4bd22d0

File tree

5 files changed

+29
-21
lines changed

5 files changed

+29
-21
lines changed

.storybook/main.js

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,41 @@
11
const path = require('path');
2-
const custom = require('./webpack.config.js')
2+
const custom = require('./webpack.config.js');
33

44
module.exports = {
5-
"stories": [
6-
"../src/**/*.stories.mdx",
7-
"../src/**/*.stories.@(js|jsx|ts|tsx)"
8-
],
9-
"addons": [
10-
"@storybook/addon-links",
11-
"@storybook/addon-essentials"
12-
],
5+
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
6+
addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
137
webpackFinal: async (config, { configType }) => {
148
// `configType` has a value of 'DEVELOPMENT' or 'PRODUCTION'
159
// You can change the configuration based on that.
1610
// 'PRODUCTION' is used when building the static version of storybook.
1711

1812
// allow for css modules -- overriding storybook default
1913
config.module.rules = config.module.rules.filter(
20-
rule => rule.test.toString() !== '/\\.css$/'
14+
(rule) => rule.test.toString() !== '/\\.css$/'
2115
);
2216
config.module.rules.push({
2317
test: /\.css$/,
24-
use: ['style-loader', 'css-loader'],
18+
use: ['style-loader', 'css-loader']
2519
});
2620

2721
//allow for sass support
2822
config.module.rules.push({
2923
test: /\.scss$/,
30-
use: ['style-loader', 'css-loader', 'sass-loader'],
31-
include: path.resolve(__dirname, '../'),
24+
use: [
25+
'style-loader',
26+
'css-loader',
27+
'sass-loader',
28+
{
29+
loader: require.resolve('sass-resources-loader'),
30+
options: {
31+
resources: path.resolve(__dirname, '../src/global/_global.scss')
32+
}
33+
}
34+
],
35+
include: path.resolve(__dirname, '../')
3236
});
3337

34-
3538
// Return the altered config
3639
return config;
37-
},
38-
}
40+
}
41+
};

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
"dependencies": {
7676
"@fortawesome/fontawesome-free": "^5.15.1",
7777
"@popperjs/core": "^2.5.4",
78-
"@types/jest": "^26.0.18"
78+
"@types/jest": "^26.0.18",
79+
"sass-resources-loader": "^2.1.1"
7980
}
8081
}

src/components/Progress/Progress.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import './progress.css';
2+
import './progress.scss';
33

44
interface ProgressProps {
55
children?: string;

src/components/Progress/progress.css renamed to src/components/Progress/progress.scss

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
.progress {
22
width: 100%;
3-
background-color: #efefef;
3+
background-color: $lightGrey;
44
border-radius: 4px;
55
position: relative;
66
}
77

88
.progress-bar {
99
/* display: block; */
1010
height: 100%;
11-
1211
position: relative;
1312
overflow: hidden;
1413
/* line-height: 100%;
@@ -19,7 +18,7 @@
1918
display: flex;
2019
justify-content: center;
2120
align-items: center;
22-
font-family: Arial, Helvetica, sans-serif;
21+
font-family: $fontFamily;
2322
}
2423

2524
.progress-bar:first-child {

src/global/_global.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// Variables
2+
3+
$fontFamily: Arial, Helvetica, sans-serif;
4+
5+
$lightGrey: #efefef;

0 commit comments

Comments
 (0)