Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[PBIOS-187] Docs: User #2898

Merged
merged 11 commits into from
Dec 22, 2023
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
![user-horizontal](https://github.com/powerhome/playbook/assets/92755007/63680051-6a88-4ae7-bffd-74d8e9b3a805)

```swift

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
)
}

```
10 changes: 10 additions & 0 deletions playbook/app/pb_kits/playbook/pb_user/docs/_user_props_table.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
### Props
| 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 | | |
34 changes: 34 additions & 0 deletions playbook/app/pb_kits/playbook/pb_user/docs/_user_size_swift.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
![user-size](https://github.com/powerhome/playbook/assets/92755007/4f463f27-028f-4d90-9d79-5f39caacc7a9)

```swift

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
)
}

```
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
![user-text-only](https://github.com/powerhome/playbook/assets/92755007/823da524-9387-4a85-80f7-ff937f9e8bf2)

```swift

let img = Image("andrew", bundle: .module)
let name = "Andrew K"
let title = "Rebels Developer"

VStack(spacing: Spacing.small) {
PBUser(
name: name,
displayAvatar: false,
size: .large,
territory: "PHL",
title: title
)

PBUser(
name: name,
displayAvatar: false,
territory: "PHL",
title: title
)
}

```
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
![user-verticle-size](https://github.com/powerhome/playbook/assets/92755007/d5c3ad50-e144-47de-8c41-07b279d4875a)

```swift

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
)
}

```
7 changes: 7 additions & 0 deletions playbook/app/pb_kits/playbook/pb_user/docs/example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,10 @@ examples:
- user_vertical_size: Vertical Size
- user_subtitle: Subtitle
- user_block_content_subtitle_react: Block Content Subtitle

swift:
- user_horizontal_swift: Horizontal
- user_vertical_size_swift: Vertical
- user_text_only_swift: Text Only
- user_size_swift: Horizontal Size
- user_props_table: ""