From 5b388fb7b0225cf4d00202ca1f96bd9c50881b66 Mon Sep 17 00:00:00 2001 From: NuPlay <73557895+NuPlay@users.noreply.github.com> Date: Tue, 12 Oct 2021 01:28:31 +0900 Subject: [PATCH] Update README.md --- README.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 86c0c51..e7d93f5 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,49 @@ -# ExpandableText +

ExpandableText 😎 (SwiftUI)

+

+ + version + + + Swift: 5.1+ + + + iOS: 13.0+ + + + license +

+

Expand the text with the "more" button

+

example

+ + + +## Get Started + +```swift +import SwiftUI +import ExpandableText + +struct ExpandableText_Test: View { + + var body: some View { + ExpandableText(text: "Do you think you're living an ordinary life? You are so mistaken it's difficult to even explain. The mere fact that you exist makes you extraordinary. The odds of you existing are less than winning the lottery, but here you are. Are you going to let this extraordinary opportunity pass?") + .font(.body)//optional + .foregroundColor(.primary)//optional + .lineLimit(3)//optional + .animation(.easeOut)//optional + .padding(.horizontal, 24)//optional + } +} +``` + +## Modifier(optional) + +Modifier | Default +--- | --- +`.font(_ font: Font)` | `.body` +`.lineLimit(_ lineLimit: Int)` | `3` +`.foregroundColor(_ color: Color)` | `.primary` +`.expandButtonText(_ text: String)` | `"more"` +`.expandButtonColor(_ color: Color)` | `.blue` + -A description of this package.