// 크루 나가기 버튼
private let exitCrewButton: UIButton = {
let exitCrewButton = UIButton()
let buttonFont = UIFont.carmuFont.subhead1
var titleAttr = AttributedString(" 크루 나가기")
titleAttr.font = buttonFont
let symbolConfiguration = UIImage.SymbolConfiguration(font: buttonFont)
let symbolImage = UIImage(systemName: "x.circle.fill", withConfiguration: symbolConfiguration)
// 버튼 Configuration 설정
var config = UIButton.Configuration.filled()
config.attributedTitle = titleAttr
config.image = symbolImage
config.imagePlacement = .leading
config.background.cornerRadius = 16
config.baseBackgroundColor = UIColor.semantic.backgroundDefault
config.baseForegroundColor = UIColor.semantic.negative
let verticalPad: CGFloat = 8.0
let horizontalPad: CGFloat = 12.0
config.contentInsets = NSDirectionalEdgeInsets(
top: verticalPad,
leading: horizontalPad,
bottom: verticalPad,
trailing: horizontalPad
)
exitCrewButton.configuration = config
// 그림자 설정
exitCrewButton.layer.shadowColor = UIColor.theme.blue6?.cgColor
exitCrewButton.layer.shadowOpacity = 0.2
exitCrewButton.layer.shadowOffset = CGSize(width: 1, height: 1)
exitCrewButton.layer.shadowRadius = 8
return exitCrewButton
}()
