Files
sodalive-ios/SodaLive/Sources/Live/Room/V2/Component/Button/LiveRoomOverlayStrokeTextButton.swift
Yu Sung e95d152e45 라이브 게스트
- 본인이 스피커일 때 리스너로 변경하는 버튼 추가
2024-03-15 00:56:49 +09:00

46 lines
1.1 KiB
Swift

//
// LiveRoomOverlayStrokeTextButton.swift
// SodaLive
//
// Created by klaus on 2024/01/17.
//
import SwiftUI
struct LiveRoomOverlayStrokeTextButton: View {
let text: String
let textColor: Color
let strokeColor: Color
let strokeWidth: CGFloat
let strokeCornerRadius: CGFloat
let onClick: () -> Void
var body: some View {
Text(text)
.font(.custom(Font.medium.rawValue, size: 12))
.foregroundColor(textColor)
.padding(.horizontal, 8)
.padding(.vertical, 6)
.overlay(
RoundedRectangle(cornerRadius: strokeCornerRadius)
.stroke(strokeColor, lineWidth: strokeWidth)
)
.onTapGesture { onClick() }
}
}
struct LiveRoomOverlayStrokeTextButton_Previews: PreviewProvider {
static var previews: some View {
LiveRoomOverlayStrokeTextButton(
text: "라이브 종료",
textColor: Color.mainRed,
strokeColor: Color.mainRed,
strokeWidth: 1,
strokeCornerRadius: 5.3,
onClick: {}
)
}
}