index.tsx 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * <<
  3. * Davinci
  4. * ==
  5. * Copyright (C) 2016 - 2017 EDP
  6. * ==
  7. * Licensed under the Apache License, Version 2.0 (the "License");
  8. * you may not use this file except in compliance with the License.
  9. * You may obtain a copy of the License at
  10. *
  11. * http://www.apache.org/licenses/LICENSE-2.0
  12. *
  13. * Unless required by applicable law or agreed to in writing, software
  14. * distributed under the License is distributed on an "AS IS" BASIS,
  15. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16. * See the License for the specific language governing permissions and
  17. * limitations under the License.
  18. * >>
  19. */
  20. import React from 'react'
  21. import { Input } from 'antd'
  22. const Search = Input.Search
  23. const utilStyles = require('assets/less/util.less')
  24. interface ISearchFilterDropdownProps {
  25. placeholder: string
  26. value: string
  27. onChange: (e: React.ChangeEvent<HTMLInputElement>) => void
  28. onSearch: (value: string) => void
  29. }
  30. export function SearchFilterDropdown (props: ISearchFilterDropdownProps) {
  31. return (
  32. <div className={utilStyles.searchFilterDropdown}>
  33. <Search
  34. size="large"
  35. placeholder={props.placeholder}
  36. value={props.value}
  37. onChange={props.onChange}
  38. onSearch={props.onSearch}
  39. />
  40. </div>
  41. )
  42. }
  43. export default SearchFilterDropdown