0.1.9 • Published 2 years ago
@examedi/widget v0.1.9
Widget Examedi
Widget of Examedi scheduling steps for React Native. Just import the component and it'll display, allowing to select exams, date and pay the appointment.
Installation
With yarn
yarn add @examedi/widget
or with npm
npm i @examedi/widget
Usage
To create an appointment with Examedi, you must import ExamediWidget component... and that's it!
import { useState } from "react";
import { Button, StyleSheet, Text, View } from "react-native";
import { ExamediWidget } from "@examedi/widget";
export default function App() {
const [open, setIsOpen] = useState(true);
return (
<View style={styles.container}>
<ExamediWidget
fullScreen
open={open}
onCloseButton={() => setIsOpen(false)}
clientId="abcd-1234-efgh-5678"
/>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
},
});
Props
ExamediWidget
Prop | Description | Type | Required | Example |
---|---|---|---|---|
clientId | clientId of your organization. | string | required | abcd-1234-efgh-5678 |
open | Display or hide the component. If true ExamediWidget will display, if false ExamediWidget will hide. | boolean | required | true/false |
fullScreen | Indicate if ExamediWidget should display in fullScreen or not. | boolean | optional | true/false |
onCloseButton | Callback function to exec when close ExamediWidget. | function | optional | () => handleCloseModal(arg1, arg2) |
containerStyle | Style to apply to container View of ExamediWidget. | object | optional | { backgroundColor: "yellow"} |