Skip to content

Commit 7bb6b0e

Browse files
committed
Adding preview and retroactive back in.
1 parent 10aa886 commit 7bb6b0e

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

CodeEdit/Features/Editor/TabBar/Tabs/Tab/EditorTabCloseButton.swift

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,18 @@ struct EditorTabCloseButton: View {
104104
}
105105
}
106106
}
107+
108+
@available(macOS 14.0, *)
109+
#Preview {
110+
@Previewable @State var closeButtonGestureActive: Bool = false
111+
@Previewable @State var isHoveringClose: Bool = false
112+
113+
return EditorTabCloseButton(
114+
isActive: false,
115+
isHoveringTab: false,
116+
isDragging: false,
117+
closeAction: { print("Close tab") },
118+
closeButtonGestureActive: $closeButtonGestureActive,
119+
isHoveringClose: $isHoveringClose
120+
)
121+
}

CodeEdit/Utils/Extensions/URL/URL+Identifiable.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import Foundation
99

10-
extension URL: Identifiable {
10+
extension URL: @retroactive Identifiable {
1111
public var id: String {
1212
absoluteString
1313
}

0 commit comments

Comments
 (0)