| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- import SwiftUI
- struct GradientButton: View {
- let title: String
- let action: () -> Void
- var body: some View {
- Button(action: action) {
- HStack(spacing: 10) {
- Image(systemName: "sparkles")
- .font(.system(size: 15, weight: .semibold))
- Text(title)
- .font(.system(size: 16, weight: .semibold))
- .textSelection(.disabled)
- Image(systemName: "arrow.right")
- .font(.system(size: 14, weight: .semibold))
- }
- .foregroundStyle(.white)
- .padding(.horizontal, 28)
- .padding(.vertical, 15)
- .frame(maxWidth: .infinity)
- .background(AppTheme.primaryGradient)
- .clipShape(Capsule())
- .shadow(color: AppTheme.teal.opacity(0.30), radius: 10, y: 4)
- }
- .buttonStyle(.plain)
- }
- }
- struct ToolbarButton: View {
- let title: String
- let iconName: String
- let action: () -> Void
- var body: some View {
- Button(action: action) {
- HStack(spacing: 6) {
- Image(systemName: iconName)
- .font(.system(size: 12))
- Text(title)
- .font(.system(size: 12, weight: .medium))
- }
- .foregroundStyle(AppTheme.textSecondary)
- .padding(.horizontal, 12)
- .padding(.vertical, 7)
- .background(Color.white)
- .clipShape(RoundedRectangle(cornerRadius: 8))
- .overlay(
- RoundedRectangle(cornerRadius: 8)
- .stroke(AppTheme.border, lineWidth: 1)
- )
- .shadow(color: Color.black.opacity(0.03), radius: 2, y: 1)
- }
- .buttonStyle(.plain)
- }
- }
- struct IconButton: View {
- let iconName: String
- let action: () -> Void
- var body: some View {
- Button(action: action) {
- Image(systemName: iconName)
- .font(.system(size: 14))
- .foregroundStyle(AppTheme.textSecondary)
- .frame(width: 36, height: 36)
- .background(Color.white)
- .clipShape(RoundedRectangle(cornerRadius: 8))
- .overlay(
- RoundedRectangle(cornerRadius: 8)
- .stroke(AppTheme.border, lineWidth: 1)
- )
- .shadow(color: Color.black.opacity(0.04), radius: 3, y: 1)
- }
- .buttonStyle(.plain)
- }
- }
|