qpp-style 9.8.0 → 9.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import FeatherIcon from 'feather-icons-react';
3
+ import SearchIcon from '@material-ui/icons/Search';
4
4
 
5
5
  const Search = ({
6
6
  id,
@@ -47,7 +47,7 @@ const Search = ({
47
47
  className="qpp-c-search__submit qpp-c-button qpp-c-button--text"
48
48
  >
49
49
  <span className="qpp-u-visually-hidden">Search</span>
50
- <FeatherIcon icon="search" />
50
+ <SearchIcon classes={{ root: 'qpp-icon-mat' }} />
51
51
  </button>
52
52
  </div>
53
53
  </form>
@@ -57,6 +57,20 @@ const NavLinkDrawer = ({
57
57
  );
58
58
  };
59
59
 
60
+ const buildLeftIconClasses = () => {
61
+ let leftIcon = `left-icon`;
62
+
63
+ if (isAlwaysOpen) {
64
+ leftIcon += ` always-open`;
65
+ }
66
+
67
+ if (isHighlighted) {
68
+ leftIcon += ' fill-white';
69
+ }
70
+
71
+ return leftIcon;
72
+ }
73
+
60
74
  // Classes for the link drawer button
61
75
  const currentPage = isCurrentPage(
62
76
  { items, listOfLinks, url },
@@ -67,7 +81,7 @@ const NavLinkDrawer = ({
67
81
  const renderLeftIcon = (leftIcon) => {
68
82
  if (leftIcon) {
69
83
  return (<svg
70
- className={`left-icon${isAlwaysOpen ? ' always-open' : ''}`}
84
+ className={`${buildLeftIconClasses()}`}
71
85
  aria-hidden="true"
72
86
  focusable="false"
73
87
  >