Skip to content

Commit 5ee776f

Browse files
committed
wip
1 parent ec8a180 commit 5ee776f

File tree

2 files changed

+7
-59
lines changed

2 files changed

+7
-59
lines changed

Sources/HTMLAttributes+PointFreeHTML/Href.swift

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -16,49 +16,4 @@ extension HTML {
1616
) -> _HTMLAttributes<Self> {
1717
self.attribute(Href.attribute, value?.description)
1818
}
19-
20-
// /// Add an href attribute with a URL object
21-
// @discardableResult
22-
// public func href(
23-
// _ url: URL?
24-
// ) -> _HTMLAttributes<Self> {
25-
// self.attribute(Href.attribute, url.map(Href.init)?.description )
26-
// }
2719
}
28-
//
29-
// extension HTML {
30-
// /// Create an email link
31-
// @discardableResult
32-
// public func emailLink(
33-
// _ address: String,
34-
// subject: String? = nil,
35-
// body: String? = nil
36-
// ) -> _HTMLAttributes<Self> {
37-
// self.href(Href.email(address, subject: subject, body: body))
38-
// }
39-
//
40-
// /// Create a telephone link
41-
// @discardableResult
42-
// public func telLink(
43-
// _ phoneNumber: String
44-
// ) -> _HTMLAttributes<Self> {
45-
// self.href(Href.tel(phoneNumber))
46-
// }
47-
//
48-
// /// Create an SMS link
49-
// @discardableResult
50-
// public func smsLink(
51-
// _ phoneNumber: String,
52-
// body: String? = nil
53-
// ) -> _HTMLAttributes<Self> {
54-
// self.href(Href.sms(phoneNumber, body: body))
55-
// }
56-
//
57-
// /// Create a link to a specific fragment (anchor)
58-
// @discardableResult
59-
// public func fragmentLink(
60-
// _ fragmentId: String
61-
// ) -> _HTMLAttributes<Self> {
62-
// self.href(Href.anchor(fragmentId))
63-
// }
64-
// }

Tests/HTML+CSS+PointFreeHTML Tests/HTML+CSS+PointFree Tests.swift

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,17 @@ import Testing
1414

1515
@Suite(
1616
"HTML+CSS+PointFreeHTML Tests",
17-
.snapshots(record: nil)
17+
.snapshots(record: .missing)
1818
)
1919
struct IntegrationTests {
20-
@Test("HTML Elements with attributes and styles")
21-
func labeledInputInDivWithStyle() {
20+
@Test("HTML element with attributes and styles")
21+
func anchorElementWithStyling() {
2222
assertInlineSnapshot(
2323
of: HTMLDocument {
24-
ContentDivision {
25-
Label {
26-
"label-text"
27-
Input.text
28-
.color(.blue)
29-
}
30-
.color(.red)
24+
Anchor(href: "#") {
25+
"Click here!"
3126
}
27+
.color(.red)
3228
},
3329
as: .html
3430
) {
@@ -38,13 +34,10 @@ struct IntegrationTests {
3834
<head>
3935
<style>
4036
.color-dMYaj4{color:red}
41-
.color-jiDhg4{color:blue}
4237
4338
</style>
4439
</head>
45-
<body>
46-
<div><label class="color-dMYaj4">label-text<input class="color-jiDhg4" type="text"></label>
47-
</div>
40+
<body><a class="color-dMYaj4" href="#">Click here!</a>
4841
</body>
4942
</html>
5043
"""

0 commit comments

Comments
 (0)