【SwiftUI】Buttonのスタイル

# iOS
## automatic
![Simulator Screen Shot - iPhone 12 - 2022-06-10 at 14.07.19.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1745371/31b86483-ca1a-f20b-419a-670d93c8d919.png)
```swift
struct ContentView: View {
    var body: some View {
        List {
            Button(action: {
                print("automatic")
            }) {
                Text("テスト")
            }
            .buttonStyle(.automatic)
        }
    }
}
```
:::note info
セル全体がボタンになっています。
:::

## bordered
![Simulator Screen Shot - iPhone 12 - 2022-06-10 at 14.08.11.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1745371/3e7b94a9-b04b-b2b9-9531-ea63e46277db.png)
```swift
struct ContentView: View {
    var body: some View {
        List {
            Button(action: {
                print("bordered")
            }) {
                Text("テスト")
            }
            .buttonStyle(.bordered)
        }
    }
}
```

## plain
![Simulator Screen Shot - iPhone 12 - 2022-06-10 at 14.10.02.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1745371/05a5d89e-611c-30d0-682a-94aa1a6ed1cb.png)
```swift
struct ContentView: View {
    var body: some View {
        List {
            Button(action: {
                print("plain")
            }) {
                Text("テスト")
            }
            .buttonStyle(.plain)
        }
    }
}
```
## borderedProminent
![Simulator Screen Shot - iPhone 12 - 2022-06-10 at 14.11.14.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1745371/9c57fbcb-98e5-3935-8be4-042de066cf31.png)
```swift
struct ContentView: View {
    var body: some View {
        List {
            Button(action: {
                print("borderedProminent")
            }) {
                Text("テスト")
            }
            .buttonStyle(.borderedProminent)
        }
    }
}
```
## borderless
![Simulator Screen Shot - iPhone 12 - 2022-06-10 at 20.07.22.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1745371/8cd153fe-85da-cd2b-3286-958080bbea72.png)
```swift
struct ContentView: View {
    var body: some View {
        List {
            Button(action: {
                print("borderless")
            }) {
                Text("テスト")
            }
            .buttonStyle(.borderless)
        }
    }
}
```

# macOS
## automatic
![スクリーンショット 2022-06-10 20.16.56.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1745371/02d07968-e3d7-9569-4676-78c1d74a3ca2.png)
```swift
struct ContentView: View {
    var body: some View {
        VStack {
            Button(action: {

            }) {
                Text("テスト")
            }
            .buttonStyle(.automatic)
        }
        .frame(width: 600, height: 400)
    }
}
```
## bordered
![スクリーンショット 2022-06-10 20.16.56.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1745371/02d07968-e3d7-9569-4676-78c1d74a3ca2.png)
```swift
struct ContentView: View {
    var body: some View {
        VStack {
            Button(action: {

            }) {
                Text("テスト")
            }
            .buttonStyle(.bordered)
        }
        .frame(width: 600, height: 400)
    }
}
```

## plain
![スクリーンショット 2022-06-10 20.51.20.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1745371/428220ae-39db-fe26-2f6c-ab666171c9de.png)
```swift
struct ContentView: View {
    var body: some View {
        VStack {
            Button(action: {

            }) {
                Text("テスト")
            }
            .buttonStyle(.plain)
        }
        .frame(width: 600, height: 400)
    }
}
```
## borderedProminent
![スクリーンショット 2022-06-10 20.54.17.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1745371/883680a9-7864-87fb-5bb8-1c2a4586c54c.png)
```swift
struct ContentView: View {
    var body: some View {
        VStack {
            Button(action: {

            }) {
                Text("テスト")
            }
            .buttonStyle(.borderedProminent)
        }
        .frame(width: 600, height: 400)
    }
}
```

## borderless
![スクリーンショット 2022-06-10 20.54.49.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1745371/53571b5c-4868-d33d-ba8e-4c20c9a43a3d.png)
```swift
struct ContentView: View {
    var body: some View {
        VStack {
            Button(action: {

            }) {
                Text("テスト")
            }
            .buttonStyle(.borderless)
        }
        .frame(width: 600, height: 400)
    }
}
```

## link
![スクリーンショット 2022-06-10 20.55.17.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1745371/7e94b58a-b04d-2dcb-1a3c-c96792782168.png)
```swift
struct ContentView: View {
    var body: some View {
        VStack {
            Button(action: {

            }) {
                Text("テスト")
            }
            .buttonStyle(.link)
        }
        .frame(width: 600, height: 400)
    }
}
```