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
extension GroupBoxStyle where Self == MusicGroupBoxStyle { | |
static var music: MusicGroupBoxStyle { .init() } | |
//static var music: Self { Self() } | |
} |
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
import SwiftUI | |
struct BackgroundCheckeredPattern<Content: View>: View { | |
var size: CGFloat | |
@ViewBuilder var content: () -> Content | |
var body: some View { | |
ZStack { | |
CheckeredPattern(size: size) | |
.edgesIgnoringSafeArea(.all) |
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
import SwiftUI | |
import Throttler | |
struct TestDebounceTextField: View { | |
@State var debouncedText = "" | |
var body: some View { | |
VStack { | |
Text("\(debouncedText)") |
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
import SwiftUI | |
struct SnapList: View { | |
private let colors: [Color] = [ | |
.white, .black, .red, .blue, .yellow, .green | |
] | |
var body: some View { | |
ScrollView { | |
LazyVStack(spacing: 0) { |
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
import SwiftUI | |
struct TestShadow: View { | |
var body: some View { | |
VStack { | |
Text("こちらへ") | |
Text("▶") | |
} | |
.padding() | |
.background(.yellow) |
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
import SwiftUI | |
struct TestContainerShape: View { | |
var body: some View { | |
VStack { | |
Text("🐶 Dog") | |
.padding() | |
.background(.yellow) | |
.clipShape(.rect(cornerRadius: 24)) // * |
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
import SwiftUI | |
struct TestSearchTextField: View { | |
@Binding var text: String | |
@FocusState private var focused: Bool | |
var body: some View { | |
VStack { | |
HStack(spacing: 0){ |
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
import SwiftUI | |
struct TestClickEvent: View { | |
var body: some View { | |
VStack { | |
Button("default") { | |
print("clicked.") // OK | |
} |
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
import SwiftUI | |
struct TestDataFlow: View { | |
@State var text = "" | |
@State var isOn = false | |
var stateHolder = StateHolder() | |
var body: some View { |
NewerOlder