
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
mayo-settings
Advanced tools
Easily integrate a user preference modal in your React Native applications with MayoSettingsModal, now supporting multiple independent modal instances.
npm install mayo-settings
# OR
yarn add mayo-settings
First, wrap your application with MayoSettingsProvider. This provides the necessary context for managing multiple MayoSettingsModal instances.
import { MayoSettingsProvider } from 'mayo-settings';
function App() {
return (
<MayoSettingsProvider>
{/* Rest of your app components */}
</MayoSettingsProvider>
);
}
Here's how you can use the MayoSettingsModal in your component:
import { MayoSettingsModal, useMayoSettings } from 'mayo-settings';
function SettingsComponent() {
const { openModal, closeModal } = useMayoSettings();
return (
<>
<Button onPress={() => openModal("settingsModalId")} title="Open Settings" />
<MayoSettingsModal
id="settingsModalId"
onClose={() => closeModal("settingsModalId")}
onLogout={handleLogout}
config={{
headerTitle: 'Custom Settings',
logoutButtonText: 'Custom Logout',
}}
>
{/* Your custom settings go here */}
</MayoSettingsModal>
</>
);
}
Here are some of the available props and configuration options you can pass to MayoSettingsModal:
| Prop Name | Type | Description |
|---|---|---|
| id | boolean | A unique identifier for the modal instance. |
| onClose | function | Callback function when closing the modal. |
| onLogout | function | Callback function when the logout action is triggered. |
| config | object | Configuration object for additional modal settings. |
For the config object:
| Property Name | Type | Description |
|---|---|---|
| headerTitle | string | Title text for the modal header. |
| logoutButtonText | string | Text for the logout action button. |
| showFooter | boolean | Shows of not the footer with the logout button |
MayoSettingsModal| Prop | Type | Description |
|---|---|---|
| onLogout | function | Callback to handle logout logic. |
| children | ReactNode | Children components for your settings. |
| config | object (optional) | Configuration for the modal. |
useMayoSettingsHook to manage user preferences.
openModal(id: string): Opens a modal by its unique ID.closeModal(id: string): Closes a modal by its unique ID.This project is licensed under the MIT License.
FAQs
A injectable modal in react-native apps to host user preferences
We found that mayo-settings demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.