-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up, document and prepare for 1.0 release (#42)
* remove stateful view and view+if helpers, we're going to move them into a different utils library and keep nice components nice and simple * save pointing a bunch of polish * clean up documentation for lots more files * finish up updating documentation * shadowStyle -> NiceShadowStyle * fix up readme a little * fix needing to declare color * update changelog * undo change from niceFontStyle -> fontStyle, shouldn't be needed * add copyright notice to all file headers
- Loading branch information
1 parent
2297d34
commit d83b84f
Showing
51 changed files
with
1,189 additions
and
738 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Welcome! | ||
|
||
Our project is small, so we're happy to receive feedback and bug reports via Github issues. @apike or @brendanlensink will work to triage and respond. You can also email us, [email protected]. | ||
Our project is small, so we're happy to receive feedback and bug reports via Github issues. @brendanlensink will work to triage and respond. You can also email us, [email protected]. | ||
|
||
If you'd like to submit a pull request that doesn't fix something there's already an open issue for, it's probably best to start with filing an issue about what change you'd like to make. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"object": { | ||
"pins": [ | ||
{ | ||
"package": "Kingfisher", | ||
"repositoryURL": "https://github.com/onevcat/Kingfisher.git", | ||
"state": { | ||
"branch": null, | ||
"revision": "44e891bdb61426a95e31492a67c7c0dfad1f87c5", | ||
"version": "7.4.1" | ||
} | ||
} | ||
] | ||
}, | ||
"version": 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,48 @@ | ||
// | ||
// BorderlessButton.swift | ||
// | ||
// NiceComponents | ||
// | ||
// Created by Brendan on 2021-07-13. | ||
// Copyright © 2022 Steamclock Software. All rights reserved. | ||
// | ||
|
||
import SwiftUI | ||
|
||
/// A themed button with no border. | ||
public struct BorderlessButton: NiceButton { | ||
public let text: String | ||
public let inactive: Bool | ||
public let style: NiceButtonStyle | ||
public let action: () -> Void | ||
public let inactive: Bool | ||
|
||
public var leftImage: ResizableImage? | ||
public var rightImage: ResizableImage? | ||
public var rightImageOffset: CGFloat? | ||
public var leftImage: NiceImage? | ||
public var rightImage: NiceImage? | ||
|
||
public var leftImageOffset: CGFloat? | ||
public var rightImageOffset: CGFloat? | ||
|
||
public static var defaultStyle: NiceButtonStyle { | ||
Config.current.borderlessButtonStyle | ||
} | ||
|
||
/** | ||
* Create a new borderless button. | ||
* | ||
* - Parameters: | ||
* - text: The body text of the button. | ||
* - inactive: Whether the button should be interactable or not. Default is `false`. | ||
* - style: The styling to apply to the button. Defaults to the current `borderlessButtonStyle` in your config. | ||
* - action: The action to be performed when the button is tapped. | ||
*/ | ||
public init( | ||
_ text: String, | ||
inactive: Bool = false, | ||
style: NiceButtonStyle? = nil, | ||
disabled: Bool = false, | ||
action: @escaping () -> Void | ||
) { | ||
self.text = text | ||
self.inactive = inactive | ||
self.style = style ?? Config.current.borderlessButtonStyle | ||
self.inactive = disabled | ||
self.action = action | ||
} | ||
} |
Oops, something went wrong.