1.0.4 • Published 9 months ago
straiberry-checkup v1.0.4
Straiberry Checkup
Checkup your teeth by ai ! Just upload your teeth photos and ai recognize problems automatically.
Installation:
npm i straiberry-checkup
Usage:
ReactJs:
import React, {useState} from React;
import StraiberryCheckup from "straiberry-checkup";
const Home = () => {
const [show, setShow] = useState(false);
return <StraiberryCheckup appId="YOUR_APP_ID" show={show} onClose={() => setShow(false)}/>
};
NextJs:
We use some features of window and window is not available on the server ! So its easy, just disable ssr for StraiberryCheckup component like below:
import React, {useState} from React;
import dynamic from "next/dynamic";
const StraiberryCheckup = dynamic(
() => import("straiberry-checkup"),
{
ssr: false,
}
);
const Home = () => {
const [show, setShow] = useState(false)
return <StraiberryCheckup appId="YOUR_APP_ID" show={show} onClose={() => setShow(false)}/>
};
Props
- appId: string; your appId
- show: boolean; control visibility of component
- language: string; your language (Optional) default is fa
- onClose: function; this function will call on click on close btn (Optional)
- onSetAppointmentClick: function; add a setAppointment btn in results and pass this function as onClick (Optional)