Skip to content
This repository was archived by the owner on Jan 9, 2023. It is now read-only.

Commit 3e822df

Browse files
authored
Merge branch 'master' into bump-react-bootstrap
2 parents a6f60a8 + baff939 commit 3e822df

File tree

6 files changed

+33
-15
lines changed

6 files changed

+33
-15
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# [3.0.0](https://github.com/HospitalRun/components/compare/v2.0.1...v3.0.0) (2020-09-15)
2+
3+
4+
### Bug Fixes
5+
6+
* **component:** ship components package with header injected styles ([afee9ff](https://github.com/HospitalRun/components/commit/afee9ffae8adb39efa89ec3040061150300d2e90)), closes [#254](https://github.com/HospitalRun/components/issues/254) [#569](https://github.com/HospitalRun/components/issues/569) [#254](https://github.com/HospitalRun/components/issues/254) [#569](https://github.com/HospitalRun/components/issues/569)
7+
8+
9+
### BREAKING CHANGES
10+
11+
* **component:** we skip shipping & referencing of main.scss files. Now that there's no need for a
12+
.scss references in the front-end, the main.scss reference in the front-end must be removed.
13+
114
## [2.0.1](https://github.com/HospitalRun/components/compare/v2.0.0...v2.0.1) (2020-09-08)
215

316

package.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@hospitalrun/components",
3-
"version": "2.0.1",
3+
"version": "3.0.0",
44
"license": "MIT",
55
"funding": {
66
"type": "opencollective",
@@ -11,7 +11,8 @@
1111
"typings": "dist/index.d.ts",
1212
"files": [
1313
"dist",
14-
"scss"
14+
"scss",
15+
"!main.scss"
1516
],
1617
"repository": {
1718
"type": "git",
@@ -64,8 +65,8 @@
6465
"devDependencies": {
6566
"@babel/core": "~7.11.0",
6667
"@commitlint/cli": "~9.1.2",
67-
"@commitlint/config-conventional": "~9.1.1",
68-
"@commitlint/prompt": "~9.1.1",
68+
"@commitlint/config-conventional": "~11.0.0",
69+
"@commitlint/prompt": "~11.0.0",
6970
"@semantic-release/changelog": "~5.0.0",
7071
"@semantic-release/commit-analyzer": "~8.0.1",
7172
"@semantic-release/git": "~9.0.0",
@@ -80,7 +81,7 @@
8081
"@types/enzyme": "~3.10.3",
8182
"@types/jest": "~26.0.0",
8283
"@types/lodash": "^4.14.149",
83-
"@types/node": "~14.6.0",
84+
"@types/node": "~14.10.1",
8485
"@types/react": "~16.9.35",
8586
"@types/react-dom": "~16.9.1",
8687
"@types/react-table": "~7.0.4",
@@ -100,7 +101,7 @@
100101
"cz-conventional-changelog": "~3.3.0",
101102
"enzyme": "~3.11.0",
102103
"enzyme-adapter-react-16": "~1.15.2",
103-
"eslint": "~7.8.0",
104+
"eslint": "~7.9.0",
104105
"eslint-config-airbnb": "~18.2.0",
105106
"eslint-config-prettier": "~6.11.0",
106107
"eslint-plugin-import": "~2.22.0",
@@ -148,7 +149,7 @@
148149
"date-fns": "~2.16.0",
149150
"formik": "~2.1.0",
150151
"lodash": "~4.17.19",
151-
"moment": "~2.27.0",
152+
"moment": "~2.28.0",
152153
"react-bootstrap-typeahead": "^4.2.3",
153154
"react-datepicker": "~3.1.3",
154155
"react-spinners": "~0.9.0",

scss/main.scss

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,5 @@
88

99
/* Other CSS Imports */
1010

11-
@import '~react-toastify/dist/ReactToastify.min.css';
1211

13-
/* all scss files in src/components should be imported here */
14-
@import "../src/components/Toaster/toaster.scss";
15-
@import "../src/components/Callout/callout.scss";
12+
/* All component level SCSS files are imported @ component level */

src/components/Callout/Callout.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import React, { CSSProperties } from 'react'
33

44
import { ColorVariant } from '../../interfaces'
55

6+
import './callout.scss'
7+
68
interface Props {
79
/**
810
* Defines the title of the callout.

src/components/Toaster/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ import { ToastContainer, toast, Slide } from 'react-toastify'
44
import { titleWithMessage, titleWithoutMessage } from './components'
55
import { ToastProps, ToasterProps } from './interfaces'
66

7+
import 'react-toastify/dist/ReactToastify.min.css'
8+
import './toaster.scss'
9+
710
export const Toast: any = (
811
type: ToastProps['type'],
912
title: ToastProps['title'],

tsdx.config.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@ module.exports = {
1212
preset: 'default',
1313
}),
1414
],
15-
inject: false,
16-
// only write out CSS for the first bundle (avoids pointless extra files):
17-
extract: !!options.writeMeta,
18-
modules: true,
15+
// inject SCSS as <style> into <head>
16+
// including bootstrap styles
17+
// to skip shipping & references of .scss files
18+
inject: true,
19+
// to reuse bs4 and other package css styles
20+
modules: false,
1921
}),
2022
)
2123
return config

0 commit comments

Comments
 (0)