Newer Older
26 lines | 0.581kb
Bogdan Timofte authored 2 weeks ago
1
//
2
//  SwiftUIView.swift
3
//  USB Meter
4
//
5
//  Created by Bogdan Timofte on 02/05/2020.
6
//  Copyright © 2020 Bogdan Timofte. All rights reserved.
7
//
8

            
9
import SwiftUI
10

            
11
struct ChevronView: View {
12

            
13
    @Binding var rotate: Bool
14

            
15
    var body: some View {
16
        Button(action: {
17
            self.rotate.toggle()
18
        }) {
19
            Image(systemName: "chevron.right.circle")
20
                .imageScale(.large)
21
                .rotationEffect(.degrees(rotate ? 270 : 90))
Bogdan Timofte authored 2 weeks ago
22
                .animation(.easeInOut, value: rotate)
Bogdan Timofte authored 2 weeks ago
23
                .padding(.vertical)
24
        }
25
    }
26
}