File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -121,6 +121,7 @@ For reusable configurations:
121121let codeReviewConfig = DiffConfiguration (
122122 theme : .light ,
123123 showLineNumbers : true ,
124+ showFileHeaders : true ,
124125 fontSize : 13 ,
125126 fontWeight : .regular ,
126127 lineSpacing : .comfortable ,
@@ -201,6 +202,7 @@ struct PullRequestView: View {
201202
202203- ` .diffTheme(_ theme: DiffTheme) ` - Apply a color theme
203204- ` .diffLineNumbers(_ show: Bool) ` - Toggle line numbers
205+ - ` .diffFileHeaders(_ show: Bool) ` - Toggle file headers
204206- ` .diffFont(size: CGFloat?, weight: Font.Weight?, design: Font.Design?) ` - Configure font
205207- ` .diffLineSpacing(_ spacing: LineSpacing) ` - Set line spacing
206208- ` .diffWordWrap(_ wrap: Bool) ` - Enable word wrapping
Original file line number Diff line number Diff line change @@ -66,6 +66,22 @@ public extension DiffConfiguration {
6666 )
6767 }
6868
69+ /// Creates a new configuration with file headers toggled
70+ func withFileHeaders( _ show: Bool ) -> DiffConfiguration {
71+ DiffConfiguration (
72+ theme: theme,
73+ showLineNumbers: showLineNumbers,
74+ showFileHeaders: show,
75+ fontFamily: fontFamily,
76+ fontSize: fontSize,
77+ fontWeight: fontWeight,
78+ lineHeight: lineHeight,
79+ lineSpacing: lineSpacing,
80+ wordWrap: wordWrap,
81+ contentPadding: contentPadding
82+ )
83+ }
84+
6985 /// Creates a new configuration with word wrap toggled
7086 func withWordWrap( _ wrap: Bool ) -> DiffConfiguration {
7187 DiffConfiguration (
You can’t perform that action at this time.
0 commit comments