This kit was created for having a systematic way of displaying users with avatar, titles, name and territory. This is a versatile kit with features than can be added to display more info.
let img = Image("andrew", bundle: .module)
let name = "Andrew K"
let title = "Rebels Developer"
VStack(alignment: .leading, spacing: Spacing.small) {
PBUser(
name: name,
image: img,
territory: "PHL",
title: title
)
PBUser(
name: name,
territory: "PHL",
title: title
)
PBUser(
name: name,
image: img,
size: .small,
title: title
)
PBUser(
name: name,
image: img,
size: .small
)
}
let img = Image("andrew", bundle: .module)
let name = "Andrew K"
let title = "Rebels Developer"
VStack(alignment: .leading, spacing: Spacing.small) {
PBUser(
name: name,
image: img,
orientation: .vertical,
size: .small,
title: title
)
PBUser(
name: name,
image: img,
orientation: .vertical,
title: title
)
PBUser(
name: name,
image: img,
orientation: .vertical,
size: .large,
title: title
)
}
let img = Image("andrew", bundle: .module)
let name = "Andrew K"
let title = "Rebels Developer"
VStack(alignment: .leading, spacing: Spacing.small) {
PBUser(
name: name,
image: img,
size: .small,
territory: "PHL",
title: title
)
PBUser(
name: name,
image: img,
territory: "PHL",
title: title
)
PBUser(
name: name,
image: img,
size: .large,
territory: "PHL",
title: title
)
}
VStack(alignment: .leading, spacing: Spacing.small) {
PBUser(
name: name,
image: img,
size: .small,
territory: "PHL",
title: title,
status: .online
)
PBUser(
name: name,
image: img,
territory: "PHL",
title: title,
status: .away
)
PBUser(
name: name,
image: img,
size: .large,
territory: "PHL",
title: title,
status: .offline
)
}
Name | Type | Description | Default | Values |
---|---|---|---|---|
name | String |
Sets the User's name | ||
displayAvatar | Bool |
Displays the User's avatar | true |
true false |
image | Image |
Sets image for the avatar | ||
orientation | Orientation |
Changes the orientation of the User | .horizontal |
.horizontal .verticle |
size | UserAvatarSize |
Changes the size of the User | .medium |
.small .medium .large |
territory | String |
Adds the User's territory | ||
title | String |
Adds a title | ||
status | PBAvatar.PresenceStatus? |
An idicator for the current status of the user | .none |
.online .away .offline |