@asurraa/sura-ui-search-and-clear
v1.0.7
Published
asurraa search-and-clear
Downloads
8
Keywords
Readme
@asurraa/sura-ui-search-and-clear
Search and Clear Modal. Build in with Refresh, Add, Clear and Size Properties.
With NPM
npm i -D @asurraa/sura-ui-search-and-clear
With yarn
yarn add @asurraa/sura-ui-search-and-clear
How to use?
import { AsurRaaSearchAndClear } from "@asurraa/sura-ui-search-and-clear";
import { Fragment } from "react";
const example = () => {
const [search, setSearch] = useState<string>("");
return (
<Fragment>
<AsurRaaSearchAndClear
refreshButtonProps={{
onClick: () => {
// functions...
},
}}
addButtonProps={{
onClick: () => {
// functions...
},
}}
clearButtonProps={{
onClick: () => {
// functions...
},
}}
size={"large"}
allowClear
placeholder={"Search your customers"}
onChange={(e) => {
setSearch(e?.target?.value);
}}
/>
//* Other JSX components
</Fragment>
);
};