20 lines
439 B
Swift
20 lines
439 B
Swift
//
|
|
// https://mczachurski.dev
|
|
// Copyright © 2023 Marcin Czachurski and the repository contributors.
|
|
// Licensed under the Apache License 2.0.
|
|
//
|
|
|
|
import Foundation
|
|
import SwiftUI
|
|
|
|
extension AvatarShape {
|
|
func shape() -> some Shape {
|
|
switch self {
|
|
case .circle:
|
|
return AnyShape(Circle())
|
|
case .roundedRectangle:
|
|
return AnyShape(RoundedRectangle(cornerRadius: 5.0))
|
|
}
|
|
}
|
|
}
|