Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Sources/Ignite/Elements/Carousel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,11 @@ public struct Carousel: HTML {

/// A computed property that determines if the carousel uses crossfade transitions.
private var doesCrossfade: Bool {
if case .crossfade = style { true }
else { false }
if case .crossfade = style {
true
} else {
false
}
}

/// Creates a new carousel from an element builder that generates slides.
Expand Down
1 change: 1 addition & 0 deletions Sources/Ignite/Framework/DefaultLayout.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
/// The layout you assigned to `Site`'s `layout` property.
public struct DefaultLayout: Layout {
public var body: some HTML {
// swiftlint:disable:next force_cast
PublishingContext.shared.site.layout.body as! Ignite.Document
}
}
6 changes: 4 additions & 2 deletions Tests/IgniteTesting/Elements/Modal.swift
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ struct ModalTests {
<button type="button" class="btn btn-close" label="Close" onclick="\
const modal = document.getElementById('headerModalId');
const modalInstance = bootstrap.Modal.getInstance(modal);
if (modalInstance) { modalInstance.hide(); }"></button></div><div class="modal-body"><p>Body</p></div></div></div></div>
if (modalInstance) { modalInstance.hide(); }"></button></div>\
<div class="modal-body"><p>Body</p></div></div></div></div>
""")
}

Expand Down Expand Up @@ -185,7 +186,8 @@ struct ModalTests {
let output = element.render()

#expect(output == """
<div id="headerAndFooterModalId" tabindex="-1" class="modal fade" aria-labelledby="modalLabel" aria-hidden="true">\
<div id="headerAndFooterModalId" tabindex="-1" class="modal fade" \
aria-labelledby="modalLabel" aria-hidden="true">\
<div class="modal-dialog modal-dialog-centered">\
<div class="modal-content"><div class="modal-header"><h5>Header</h5>\
<button type="button" class="btn btn-close" label="Close" onclick="\
Expand Down