diff --git a/playbook/app/pb_kits/playbook/pb_user/docs/_user_horizontal_swift.md b/playbook/app/pb_kits/playbook/pb_user/docs/_user_horizontal_swift.md new file mode 100644 index 0000000000..e8d2e62b14 --- /dev/null +++ b/playbook/app/pb_kits/playbook/pb_user/docs/_user_horizontal_swift.md @@ -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 + ) +} + +``` diff --git a/playbook/app/pb_kits/playbook/pb_user/docs/_user_props_table.md b/playbook/app/pb_kits/playbook/pb_user/docs/_user_props_table.md new file mode 100644 index 0000000000..d29ae588af --- /dev/null +++ b/playbook/app/pb_kits/playbook/pb_user/docs/_user_props_table.md @@ -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 | | | \ No newline at end of file diff --git a/playbook/app/pb_kits/playbook/pb_user/docs/_user_size_swift.md b/playbook/app/pb_kits/playbook/pb_user/docs/_user_size_swift.md new file mode 100644 index 0000000000..c1c40fccce --- /dev/null +++ b/playbook/app/pb_kits/playbook/pb_user/docs/_user_size_swift.md @@ -0,0 +1,35 @@ +![user-size](https://github.com/powerhome/playbook/assets/54749071/ed012a15-64a1-4c13-a0bc-7457660992f6) + + +```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 + ) +} + +``` diff --git a/playbook/app/pb_kits/playbook/pb_user/docs/_user_text_only_swift.md b/playbook/app/pb_kits/playbook/pb_user/docs/_user_text_only_swift.md new file mode 100644 index 0000000000..e372b34853 --- /dev/null +++ b/playbook/app/pb_kits/playbook/pb_user/docs/_user_text_only_swift.md @@ -0,0 +1,27 @@ +![user-text-only](https://github.com/powerhome/playbook/assets/54749071/ba04df54-6590-4db6-ad32-38932a08aced) + + +```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 + ) +} + +``` diff --git a/playbook/app/pb_kits/playbook/pb_user/docs/_user_vertical_size_swift.md b/playbook/app/pb_kits/playbook/pb_user/docs/_user_vertical_size_swift.md new file mode 100644 index 0000000000..a19b5ec24f --- /dev/null +++ b/playbook/app/pb_kits/playbook/pb_user/docs/_user_vertical_size_swift.md @@ -0,0 +1,35 @@ +![user-verticle-size](https://github.com/powerhome/playbook/assets/54749071/e99b4c9b-0752-467e-971e-a6a5f520009e) + + +```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 + ) +} + +``` diff --git a/playbook/app/pb_kits/playbook/pb_user/docs/example.yml b/playbook/app/pb_kits/playbook/pb_user/docs/example.yml index 7d6b9224d8..e8efb9fec7 100644 --- a/playbook/app/pb_kits/playbook/pb_user/docs/example.yml +++ b/playbook/app/pb_kits/playbook/pb_user/docs/example.yml @@ -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: ""