Skip to content

Instantly share code, notes, and snippets.

@gert-janvercauteren
Created October 28, 2022 05:44
Show Gist options
  • Save gert-janvercauteren/792070657a26bfbd76e33f9993b520bc to your computer and use it in GitHub Desktop.
Save gert-janvercauteren/792070657a26bfbd76e33f9993b520bc to your computer and use it in GitHub Desktop.
README_EXAMPLE.md

Backpack-SwiftUI/Badge

Cocoapods class reference view on Github

Default

Day Night

Usage

Basic text badge

If you don't specify a .badgeStyle(<style>) it will use the .default type

import Backpack_SwiftUI

BPKBadge("Hello World")

BPKBadge("Hello World")
    .badgeStyle(.destructive)

Badge with icon

If you don't specify a .badgeStyle(<style>) it will use the .default type

import Backpack_SwiftUI

BPKBadge("Hello World", icon: .tickCircle)

BPKBadge("Hello World", icon: .tickCircle)
    .badgeStyle(.destructive)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment