Skip to content

Commit e3c0483

Browse files
committed
feat(icons): remove autoloading material icons
BREAKING CHANGE: consumer now imports icons. see README.
1 parent f4aec84 commit e3c0483

File tree

5 files changed

+16
-31
lines changed

5 files changed

+16
-31
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ Reusable Svelte components for some internal applications
44

55
## installation
66

7-
To install to your Svelte project, open your project's root directory in a terminal. Type `npm i @silintl/ui-components --save-dev` and press enter. You may also have to run `npm i [email protected] --save-dev` and possibly `npm i [email protected] --save-dev` to get sass stuff working if it doesn't work initially or you want to develop additional material web components in your app. It may depend on your version of npm if this is necessary. You should already have svelte@3 installed if you are using this library.
7+
To install to your Svelte project, open your project's root directory in a terminal. Type `npm i @silintl/ui-components --save-dev` and press enter. You may also have to run `npm i [email protected] --save-dev` and possibly `npm i [email protected] --save-dev` to get sass stuff working if it doesn't work initially or you want to develop additional material web components in your app. It may depend on your version of npm if this is necessary. You should already have svelte@3 installed if you are using this library. You will also want to include the following code in your index.html for material icons to work. `<link href="https://fonts.googleapis.com/icon?family=Material+Icons&display=swap" rel="stylesheet">`
8+
`
89

910
## bundler configuration
1011

components/mdc/icons/_index.css

-13
This file was deleted.

components/mdc/icons/index.js

-16
This file was deleted.

components/mdc/index.js

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import Dialog from './Dialog'
1313
import Drawer from './Drawer'
1414
import Fab from './Fab'
1515
import IconButton from './IconButton'
16-
import './icons'
1716
import { isAboveMobile, isAboveTablet } from './breakpoints'
1817
import List from './List'
1918
import Menu from './Menu'

stories/_index.scss

+14
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,17 @@
66
@use './components/mdc/TextInput' with (
77
$radius: 16px
88
);
9+
10+
/* https://google.github.io/material-design-icons/#sizing */
11+
.material-icons.md-18 {
12+
font-size: 18px;
13+
}
14+
.material-icons.md-24 {
15+
font-size: 24px;
16+
} /* this is the default from https://fonts.googleapis.com/icon?family=Material+Icons */
17+
.material-icons.md-36 {
18+
font-size: 36px;
19+
}
20+
.material-icons.md-48 {
21+
font-size: 48px;
22+
}

0 commit comments

Comments
 (0)