//
//  SwiftUIView.swift
//  USB Meter
//
//  Created by Bogdan Timofte on 02/05/2020.
//  Copyright © 2020 Bogdan Timofte. All rights reserved.
//

import SwiftUI

struct ChevronView: View {

    @Binding var rotate: Bool

    var body: some View {
        Button(action: {
            self.rotate.toggle()
        }) {
            Image(systemName: "chevron.right.circle")
                .imageScale(.large)
                .rotationEffect(.degrees(rotate ? 270 : 90))
                .animation(.easeInOut, value: rotate)
                .padding(.vertical)
        }
    }
}
