From ff1d44245d5d57f13fcc94cc6e22a82a3bb8ea78 Mon Sep 17 00:00:00 2001 From: Kyle Alwyn Date: Thu, 2 Aug 2018 11:31:44 -0700 Subject: [PATCH] fix: Utilize tree shaking for lodash --- src/Form/Checkbox.js | 2 +- src/ThemeProvider/ThemeProvider.js | 2 +- src/theme.js | 2 +- src/utils.js | 3 +-- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Form/Checkbox.js b/src/Form/Checkbox.js index 8f54182..64c63de 100644 --- a/src/Form/Checkbox.js +++ b/src/Form/Checkbox.js @@ -1,5 +1,5 @@ import React from 'react'; -import capitalize from 'lodash/capitalize'; +import { capitalize } from 'lodash'; import PropTypes from 'prop-types'; import Icon from '../Icon'; import FormError from '../Form/FormError'; diff --git a/src/ThemeProvider/ThemeProvider.js b/src/ThemeProvider/ThemeProvider.js index 5b3aa57..bc5d085 100644 --- a/src/ThemeProvider/ThemeProvider.js +++ b/src/ThemeProvider/ThemeProvider.js @@ -1,6 +1,6 @@ import React from 'react'; import { ThemeProvider as SCThemeProvider } from 'styled-components'; -import merge from 'lodash/merge'; +import { merge } from 'lodash'; import defaultTheme from '../theme'; const ThemeProvider = props => { diff --git a/src/theme.js b/src/theme.js index 57710d2..f659cf7 100644 --- a/src/theme.js +++ b/src/theme.js @@ -1,4 +1,4 @@ -import merge from 'lodash/merge'; +import { merge } from 'lodash'; import { lighten } from 'polished'; export default (overrides = {}) => { diff --git a/src/utils.js b/src/utils.js index 4a5dfd6..0c22536 100644 --- a/src/utils.js +++ b/src/utils.js @@ -1,5 +1,4 @@ -import get from 'lodash/get'; -import kebabCase from 'lodash/kebabCase'; +import { get, kebabCase } from 'lodash'; import styled from 'styled-components'; export const getFromTheme = (theme, lookup, fallback) => get(theme, lookup, fallback);