Initial commit

This commit is contained in:
2024-06-02 11:48:21 +02:00
commit 476feaa879
11 changed files with 466 additions and 0 deletions

23
README.md Normal file
View File

@ -0,0 +1,23 @@
# NVAlert Package
**Important**: 👷‍♂️ This package is currently **under construction**, and may change at any time.
## What is this?
This is a package that helps you present larger alerts (with more text) for macOS, if you dislike the smaller alerts introduced in more recent versions of macOS.
Since PHP Monitor displays many helpful prompts, I wanted something a little bit more robust than the default alerts which ship with macOS.
This was originally written as part of my "zero non first-party dependencies" policy for [PHP Monitor](https://github.com/nicoverbruggen/phpmon).
## Example usage
```swift
NVAlert().withInformation(
title: NSLocalizedString("lite_mode_explanation.title", nil),
subtitle: NSLocalizedString("lite_mode_explanation.subtitle", nil),
description: NSLocalizedString("lite_mode_explanation.description", nil)
)
.withPrimary(text: NSLocalizedString("generic.ok", nil))
.show()
```