-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: BoxButtonStyle에 width hugging priority를 설정할 수 있도록 개선
- Loading branch information
1 parent
06dfd9c
commit c8cd82f
Showing
3 changed files
with
46 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
Projects/Shared/DesignSystem/Sources/Component/Button/ButtonHuggingPriorityHorizontal.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// | ||
// ButtonHuggingPriorityHorizontal.swift | ||
// DesignSystem | ||
// | ||
// Created by devMinseok on 8/10/24. | ||
// Copyright © 2024 PomoNyang. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
public enum ButtonHuggingPriorityHorizontal { | ||
case high | ||
case low | ||
} | ||
|
||
extension ButtonHuggingPriorityHorizontal { | ||
var width: CGFloat? { | ||
switch self { | ||
case .high: | ||
return nil | ||
case .low: | ||
return .infinity | ||
} | ||
} | ||
} |