Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add component type documentation #86

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add a usage section
  • Loading branch information
rramsden committed Oct 28, 2024
commit d7f3f0d7a290075ae0ad533eb330112a46f07c2d
23 changes: 23 additions & 0 deletions src/components/PaymentModal.tsx
Original file line number Diff line number Diff line change
@@ -8,6 +8,29 @@
* - modalVisible: boolean - Controls the visibility of the modal.
* - setModalVisible: Dispatch<SetStateAction<boolean>> - Function to update the modal visibility state.
* - onDismiss?: () => void - Optional callback function called when the modal is dismissed.
*
* Usage:
* ```jsx
* import React, { useState } from 'react';
* import PaymentModal from './PaymentModal';
*
* const App = () => {
* const [modalVisible, setModalVisible] = useState(false);
*
* return (
* <div>
* <button onClick={() => setModalVisible(true)}>Show Payment Modal</button>
* <PaymentModal
* modalVisible={modalVisible}
* setModalVisible={setModalVisible}
* onDismiss={() => console.log('Modal dismissed')}
* />
* </div>
* );
* };
*
* export default App;
* ```
*/
import { Dispatch, SetStateAction } from "react";
import { TouchableOpacity, Modal, View, Image, StyleSheet } from "react-native";
Loading