mirror of
https://github.com/neon443/NearFuture.git
synced 2026-03-11 06:49:12 +00:00
Liquid Glass: - remove ultrathinmaterial from all sheets - button color change remove the eventName eventDate etcs and replaced with an event var Add addeventview for mac, cleanup #if s clean up homeview add .searchable addeventview is horizontal i have no idea why
54 lines
943 B
Swift
54 lines
943 B
Swift
//
|
|
// MagicClearButton.swift
|
|
// NearFuture
|
|
//
|
|
// Created by neon443 on 06/05/2025.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct MagicClearButton: View {
|
|
@Binding var text: String
|
|
var body: some View {
|
|
HStack {
|
|
Spacer()
|
|
Button {
|
|
text = ""
|
|
} label: {
|
|
Image(systemName: "xmark.circle.fill")
|
|
.resizable()
|
|
.scaledToFit()
|
|
.frame(width: text.isEmpty ? 0 : 25)
|
|
.symbolRenderingMode(.hierarchical)
|
|
.padding(.trailing, -5)
|
|
.animation(.spring, value: text.isEmpty)
|
|
}
|
|
.buttonStyle(.borderless)
|
|
}
|
|
}
|
|
}
|
|
|
|
struct AddEventButton: View {
|
|
@Binding var showingAddEventView: Bool
|
|
var body: some View {
|
|
Button() {
|
|
showingAddEventView.toggle()
|
|
} label: {
|
|
Image(systemName: "plus")
|
|
.resizable()
|
|
.scaledToFit()
|
|
.frame(width: 15)
|
|
.bold()
|
|
.foregroundStyle(.one)
|
|
}
|
|
}
|
|
}
|
|
|
|
#Preview {
|
|
MagicClearButton(text: .constant("s"))
|
|
}
|
|
|
|
#Preview {
|
|
AddEventButton(showingAddEventView: .constant(false))
|
|
}
|