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

Commit

Permalink
Merge branch 'master' into bump-react-bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
matteovivona authored Sep 15, 2020
2 parents a6f60a8 + baff939 commit 3e822df
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 15 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# [3.0.0](https://github.com/HospitalRun/components/compare/v2.0.1...v3.0.0) (2020-09-15)


### Bug Fixes

* **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)


### BREAKING CHANGES

* **component:** we skip shipping & referencing of main.scss files. Now that there's no need for a
.scss references in the front-end, the main.scss reference in the front-end must be removed.

## [2.0.1](https://github.com/HospitalRun/components/compare/v2.0.0...v2.0.1) (2020-09-08)


Expand Down
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hospitalrun/components",
"version": "2.0.1",
"version": "3.0.0",
"license": "MIT",
"funding": {
"type": "opencollective",
Expand All @@ -11,7 +11,8 @@
"typings": "dist/index.d.ts",
"files": [
"dist",
"scss"
"scss",
"!main.scss"
],
"repository": {
"type": "git",
Expand Down Expand Up @@ -64,8 +65,8 @@
"devDependencies": {
"@babel/core": "~7.11.0",
"@commitlint/cli": "~9.1.2",
"@commitlint/config-conventional": "~9.1.1",
"@commitlint/prompt": "~9.1.1",
"@commitlint/config-conventional": "~11.0.0",
"@commitlint/prompt": "~11.0.0",
"@semantic-release/changelog": "~5.0.0",
"@semantic-release/commit-analyzer": "~8.0.1",
"@semantic-release/git": "~9.0.0",
Expand All @@ -80,7 +81,7 @@
"@types/enzyme": "~3.10.3",
"@types/jest": "~26.0.0",
"@types/lodash": "^4.14.149",
"@types/node": "~14.6.0",
"@types/node": "~14.10.1",
"@types/react": "~16.9.35",
"@types/react-dom": "~16.9.1",
"@types/react-table": "~7.0.4",
Expand All @@ -100,7 +101,7 @@
"cz-conventional-changelog": "~3.3.0",
"enzyme": "~3.11.0",
"enzyme-adapter-react-16": "~1.15.2",
"eslint": "~7.8.0",
"eslint": "~7.9.0",
"eslint-config-airbnb": "~18.2.0",
"eslint-config-prettier": "~6.11.0",
"eslint-plugin-import": "~2.22.0",
Expand Down Expand Up @@ -148,7 +149,7 @@
"date-fns": "~2.16.0",
"formik": "~2.1.0",
"lodash": "~4.17.19",
"moment": "~2.27.0",
"moment": "~2.28.0",
"react-bootstrap-typeahead": "^4.2.3",
"react-datepicker": "~3.1.3",
"react-spinners": "~0.9.0",
Expand Down
5 changes: 1 addition & 4 deletions scss/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,5 @@

/* Other CSS Imports */

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

/* all scss files in src/components should be imported here */
@import "../src/components/Toaster/toaster.scss";
@import "../src/components/Callout/callout.scss";
/* All component level SCSS files are imported @ component level */
2 changes: 2 additions & 0 deletions src/components/Callout/Callout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import React, { CSSProperties } from 'react'

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

import './callout.scss'

interface Props {
/**
* Defines the title of the callout.
Expand Down
3 changes: 3 additions & 0 deletions src/components/Toaster/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import { ToastContainer, toast, Slide } from 'react-toastify'
import { titleWithMessage, titleWithoutMessage } from './components'
import { ToastProps, ToasterProps } from './interfaces'

import 'react-toastify/dist/ReactToastify.min.css'
import './toaster.scss'

export const Toast: any = (
type: ToastProps['type'],
title: ToastProps['title'],
Expand Down
10 changes: 6 additions & 4 deletions tsdx.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ module.exports = {
preset: 'default',
}),
],
inject: false,
// only write out CSS for the first bundle (avoids pointless extra files):
extract: !!options.writeMeta,
modules: true,
// inject SCSS as <style> into <head>
// including bootstrap styles
// to skip shipping & references of .scss files
inject: true,
// to reuse bs4 and other package css styles
modules: false,
}),
)
return config
Expand Down

0 comments on commit 3e822df

Please sign in to comment.