Skip to content

Commit

Permalink
Update documentation about custom views
Browse files Browse the repository at this point in the history
  • Loading branch information
kean committed Nov 13, 2023
1 parent ffb94bc commit 16b54fe
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions Sources/PulseUI/PulseUI.docc/PulseUI.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,31 @@ struct AnalyticsLogsView: View {

var body: some View {
List(messages, id: \.objectID) { message in
VStack(alignment: .leading) {
Text(timeFormatter.string(from: message.createdAt))
.font(.footnote)
.foregroundColor(.secondary)
Text(message.text)
.lineLimit(2)
NavigationLink {
Text("TOOD: your details view here")
} label: {
VStack(alignment: .leading) {
HStack {
Text(timeFormatter.string(from: message.createdAt))
.font(.footnote)
.foregroundColor(.secondary)
Spacer()
ListDisclosureIndicator()
}
Text(message.text)
.lineLimit(2)
}
}
}
.listStyle(.plain)
}
}

private let timeFormatter = DateFormatter(format: "HH:mm:ss.SSS")
```

> tip: For a complete example, see the [Integrations](https://github.com/kean/Pulse/tree/main/Demo/Integrations) demo.
## PulseUI on watchOS

## Topics
Expand Down

0 comments on commit 16b54fe

Please sign in to comment.