@blocklet/list 0.8.24 → 0.8.27

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,4 +1,4 @@
1
- import React, { useEffect, useState } from 'react';
1
+ import { useEffect, useState } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import SearchIcon from '@mui/icons-material/Search';
4
4
  import CloseIcon from '@mui/icons-material/Close';
@@ -8,7 +8,7 @@ import styled from 'styled-components';
8
8
 
9
9
  import { useFilterContext } from '../contexts/filter';
10
10
 
11
- const Search = ({ placeholder, ...rest }) => {
11
+ function Search({ placeholder, ...rest }) {
12
12
  const { filters, handleKeyword } = useFilterContext();
13
13
  const [searchStr, setSearchStr] = useState(filters.keyword || '');
14
14
 
@@ -51,7 +51,7 @@ const Search = ({ placeholder, ...rest }) => {
51
51
  {...rest}
52
52
  />
53
53
  );
54
- };
54
+ }
55
55
  Search.propTypes = {
56
56
  placeholder: PropTypes.string,
57
57
  };
@@ -1,4 +1,4 @@
1
- import React, { useContext, createContext, useMemo, useEffect } from 'react';
1
+ import { useContext, createContext, useMemo, useEffect } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { useRequest } from 'ahooks';
4
4
  import orderBy from 'lodash/orderBy';
package/src/index.js CHANGED
@@ -1,5 +1,3 @@
1
- import React from 'react';
2
-
3
1
  import SelectBase from './base';
4
2
  import { FilterProvider } from './contexts/filter';
5
3
  import { propTypes, defaultProps } from './libs/prop-types';