라이브 UI 변경
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
//
|
||||
// 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(Color.red)
|
||||
.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: {}
|
||||
)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user