Skip to content

Commit

Permalink
Lowered bundle size by only importing used function from lodash inste…
Browse files Browse the repository at this point in the history
…ad of entire lodash
  • Loading branch information
DaniloNovakovic committed Nov 3, 2019
1 parent f1951a6 commit 77f2ca4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/shared/theme.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createMuiTheme } from "@material-ui/core/styles";
import _ from "lodash";
import merge from "lodash/merge";

const commonTheme = {
iconSize: 16
Expand Down Expand Up @@ -36,9 +36,9 @@ const darkTheme = {
export function getTheme(type = "dark") {
switch (type) {
case "dark":
return _.merge(darkTheme, commonTheme);
return merge(darkTheme, commonTheme);
default:
return _.merge(lightTheme, commonTheme);
return merge(lightTheme, commonTheme);
}
}

Expand Down

0 comments on commit 77f2ca4

Please sign in to comment.