charity-base-search
v3.5.1
Published
React component for CharityBase search input
Downloads
13
Maintainers
Readme
CharityBase Search Component
Issues
- sync filters do not come up straight away when typing new search
Install
With Yarn:
yarn add charity-base-search
Or npm:
npm install --save charity-base-search
Make sure you have the peer dependencies installed too:
{
"prop-types": "15.x",
"react": "^16.8.0"
}
Example
import CharityBaseSearch from 'charity-base-search'
const CHARITY_BASE_API_KEY = 'YOUR_API_KEY' // get yours from https://charitybase.uk/api-portal/keys
const Demo = () => (
<div style={{ fontFamily: 'sans-serif' }}>
<h1>CharityBase Search Demo</h1>
<div style={{
width: '600px',
}}>
<CharityBaseSearch
apiKey={CHARITY_BASE_API_KEY}
label='Search charities'
onSelect={item => {
console.log(item)
}}
/>
</div>
</div>
)