SaveButton
Save button.
Props
type = {string}
item = {object}
saved = {boolean}
onChange = {function}
Example with code
import SaveButton from '@components/SaveButton';
const MyComponent = ({ result, inList }) => {
const onItemSaveChange = (saved) => {
console.log(saved === true ? 'Saved': 'Unsaved')
};
return (
<SaveButton
type="countries"
item={result}
saved={inList}
onChange={onItemSaveChange}
/>
);
};