//
//  CopyPasteButtonView.swift
//  PadelClub
//
//  Created by Razmig Sarkissian on 17/07/2024.
//

import SwiftUI

struct CopyPasteButtonView: View {
    let pasteValue: String?
    @State private var copied: Bool = false
    
    var body: some View {
        Button {
            let pasteboard = UIPasteboard.general
            pasteboard.string = pasteValue
            copied = true
        } label: {
            Label(copied ? "copié" : "copier", systemImage: "doc.on.doc").symbolVariant(copied ? .fill : .none)
        }
    }
}
