-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PBIOS-161](https://nitro.powerhrg.com/runway/backlog_items/PBIOS-161) https://github.com/powerhome/playbook/assets/92755007/66e28dac-12fc-44a4-965a-bac0b0c9e03a **How to test?** Steps to confirm the desired behavior: 1. Pull down branch to your local env and navigate to the cards doc page #### Checklist: - [x] **LABELS** Add a label: `enhancement`, `bug`, `improvement`, `new kit`, `deprecated`, or `breaking`. See [Changelog & Labels](https://github.com/powerhome/playbook/wiki/Changelog-&-Labels) for details. - [x] **DEPLOY** I have added the `milano` label to show I'm ready for a review. - [ ] **TESTS** I have added test coverage to my code. --------- Co-authored-by: Ísis <isisms2602@gmail.com>
- Loading branch information
1 parent
301e31b
commit 87c0bd4
Showing
14 changed files
with
230 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
playbook/app/pb_kits/playbook/pb_card/docs/_card_background_swift.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
 | ||
|
||
```swift | ||
VStack(alignment: .leading, spacing: Spacing.small) { | ||
PBCard { | ||
Text(text).pbFont(.body) | ||
} | ||
|
||
PBCard(backgroundColor: .background(.light)) { | ||
Text("Light").pbFont(.body, color: .text(.light)) | ||
} | ||
|
||
PBCard(backgroundColor: .background(.dark)) { | ||
Text("Dark").pbFont(.body, color: .text(.light)) | ||
} | ||
|
||
PBCard(backgroundColor: .product(.product1, category: .background)) { | ||
Text("Product 1 Background").pbFont(.body, color: .white) | ||
} | ||
|
||
PBCard(backgroundColor: .product(.product7, category: .highlight)) { | ||
Text("Product 7 Highlight").pbFont(.body, color: .white) | ||
} | ||
|
||
PBCard(backgroundColor: .product(.product2, category: .highlight)) { | ||
Text("Product 2 Highlight").pbFont(.body, color: .white) | ||
} | ||
} | ||
``` |
7 changes: 7 additions & 0 deletions
7
playbook/app/pb_kits/playbook/pb_card/docs/_card_border_none_swift.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
 | ||
|
||
```swift | ||
PBCard(border: false) { | ||
Text(text).pbFont(.body) | ||
} | ||
``` |
33 changes: 33 additions & 0 deletions
33
playbook/app/pb_kits/playbook/pb_card/docs/_card_border_radius_swift.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
 | ||
|
||
```swift | ||
VStack(spacing: Spacing.small) { | ||
PBCard(borderRadius: BorderRadius.none) { | ||
Text("None").pbFont(.body) | ||
} | ||
|
||
PBCard(borderRadius: BorderRadius.xSmall) { | ||
Text("X Small").pbFont(.body) | ||
} | ||
|
||
PBCard(borderRadius: BorderRadius.small) { | ||
Text("Small").pbFont(.body) | ||
} | ||
|
||
PBCard(borderRadius: BorderRadius.medium) { | ||
Text("Medium").pbFont(.body) | ||
} | ||
|
||
PBCard(borderRadius: BorderRadius.large) { | ||
Text("Large").pbFont(.body) | ||
} | ||
|
||
PBCard(borderRadius: BorderRadius.xLarge) { | ||
Text("X Large").pbFont(.body) | ||
} | ||
|
||
PBCard(borderRadius: BorderRadius.rounded) { | ||
Text("Rounded").pbFont(.body) | ||
} | ||
} | ||
`````` |
33 changes: 33 additions & 0 deletions
33
playbook/app/pb_kits/playbook/pb_card/docs/_card_header_swift.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
 | ||
|
||
```swift | ||
Stack(spacing: Spacing.small) { | ||
PBCard(padding: Spacing.none) { | ||
PBCardHeader(color: .category(.category1)) { | ||
Text("Category 1").pbFont(.body, color: .white).padding(Spacing.small) | ||
} | ||
Text("Body").pbFont(.body, color: .text(.default)).padding(Spacing.small) | ||
} | ||
|
||
PBCard(padding: Spacing.none) { | ||
PBCardHeader(color: .category(.category3)) { | ||
Text("Category 3").pbFont(.body, color: .black).padding(Spacing.small) | ||
} | ||
Text("Body").pbFont(.body, color: .text(.default)).padding(Spacing.small) | ||
} | ||
|
||
PBCard(padding: Spacing.none) { | ||
PBCardHeader(color: .product(.product2, category: .background)) { | ||
Text("Product 2 Background").pbFont(.body, color: .white).padding(Spacing.small) | ||
} | ||
Text("Body").pbFont(.body, color: .text(.default)).padding(Spacing.small) | ||
} | ||
|
||
PBCard(padding: Spacing.none) { | ||
PBCardHeader(color: .product(.product6, category: .background)) { | ||
Text("Product 6 Background").pbFont(.body, color: .white).padding(Spacing.small) | ||
} | ||
Text("Body").pbFont(.body, color: .text(.default)).padding(Spacing.small) | ||
} | ||
} | ||
``` |
17 changes: 17 additions & 0 deletions
17
playbook/app/pb_kits/playbook/pb_card/docs/_card_highlight_swift.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
 | ||
|
||
```swift | ||
VStack(spacing: Spacing.small) { | ||
PBCard(highlight: .side(.product(.product6, category: .highlight))) { | ||
Text("Side Position & Product 6 Highlight Color").pbFont(.body) | ||
} | ||
|
||
PBCard(highlight: .top(.status(.warning))) { | ||
Text("Top Position & Warning Color").pbFont(.body) | ||
} | ||
|
||
PBCard(highlight: .side(.category(.category2))) { | ||
Text("Side Position & Category 2 Color").pbFont(.body) | ||
} | ||
} | ||
``` |
7 changes: 7 additions & 0 deletions
7
playbook/app/pb_kits/playbook/pb_card/docs/_card_light_swift.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
 | ||
|
||
```swift | ||
PBCard { | ||
Text("Card Content").pbFont(.body) | ||
} | ||
``` |
33 changes: 33 additions & 0 deletions
33
playbook/app/pb_kits/playbook/pb_card/docs/_card_padding_swift.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
 | ||
|
||
```swift | ||
VStack(spacing: Spacing.small) { | ||
PBCard(padding: Spacing.none) { | ||
Text("None").pbFont(.body) | ||
} | ||
|
||
PBCard(padding: Spacing.xxSmall) { | ||
Text("XX Small").pbFont(.body) | ||
} | ||
|
||
PBCard(padding: Spacing.xSmall) { | ||
Text("X Small").pbFont(.body) | ||
} | ||
|
||
PBCard(padding: Spacing.small) { | ||
Text("Small").pbFont(.body) | ||
} | ||
|
||
PBCard(padding: Spacing.medium) { | ||
Text("Medium").pbFont(.body) | ||
} | ||
|
||
PBCard(padding: Spacing.large) { | ||
Text("Large").pbFont(.body) | ||
} | ||
|
||
PBCard(padding: Spacing.xLarge) { | ||
Text("X Large").pbFont(.body) | ||
} | ||
} | ||
``` |
10 changes: 10 additions & 0 deletions
10
playbook/app/pb_kits/playbook/pb_card/docs/_card_props_swift.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
### Props | ||
| Name | Type | Description | Default | Values | | ||
| --- | ----------- | --------- | --------- | --------- | | ||
| **Background Color** | `Color` | Changes background color | `.card` | `Color` | | ||
| **Border** | `Bool` | Adds border around the Card | `true` | `true` `false` | | ||
| **Border Radius** | `CGFloat` | Specifies the roundness of the Card | `BorderRadius.medium` | `BorderRadius.none` `BorderRadius.xSmall` `BorderRadius.small` `BorderRadius.medium` `BorderRadius.large` `BorderRadius.xLarge` `BorderRadius.rounded` | | ||
| **Highlight** | `Highlight` | Adds a border accent color | `.none` | `Color` | | ||
| **Padding** | `CGFloat` | Applies padding between text and border | `Spacing.medium` | `Spacing.none` `Spacing.xxSmall` `Spacing.xSmall` `Spacing.small` `Spacing.medium` `Spacing.large` `Spacing.xLarge` | | ||
| **Style** | `PBCardStyle` | Specifies the color of the border | `.default` | `.default` `.selected` `.error` `.inline` | | ||
| **Shadow** | `Shadow` | Applies shadow | `nil` | `Shadow.deep` `Shadow.deeper` `Shadow.deepest` `Shadow.none` | |
Empty file.
11 changes: 11 additions & 0 deletions
11
playbook/app/pb_kits/playbook/pb_card/docs/_card_separator_swift.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
 | ||
|
||
```swift | ||
PBCard(padding: Spacing.none) { | ||
Text("Header").pbFont(.body).padding(Spacing.small) | ||
PBSectionSeparator() | ||
Text(loremIpsum).pbFont(.body).padding(Spacing.small) | ||
PBSectionSeparator() | ||
Text("Footer").pbFont(.body).padding(Spacing.small) | ||
} | ||
``` |
21 changes: 21 additions & 0 deletions
21
playbook/app/pb_kits/playbook/pb_card/docs/_card_shadow_swift.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
 | ||
|
||
```swift | ||
VStack(spacing: Spacing.small) { | ||
PBCard(shadow: Shadow.deep) { | ||
Text("Deep").pbFont(.body) | ||
} | ||
|
||
PBCard(shadow: Shadow.deeper) { | ||
Text("Deeper").pbFont(.body) | ||
} | ||
|
||
PBCard(shadow: Shadow.deepest) { | ||
Text("Deepest").pbFont(.body) | ||
} | ||
|
||
PBCard(shadow: Shadow.none) { | ||
Text("None").pbFont(.body) | ||
} | ||
} | ||
``` |
17 changes: 17 additions & 0 deletions
17
playbook/app/pb_kits/playbook/pb_card/docs/_card_styles_swift.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
 | ||
|
||
```swift | ||
VStack(alignment: .leading, spacing: Spacing.small) { | ||
PBCard { | ||
Text("Card Context").pbFont(.body) | ||
} | ||
|
||
PBCard(style: .selected()) { | ||
Text("Card Context").pbFont(.body) | ||
} | ||
|
||
PBCard(style: .error) { | ||
Text("Card Context").pbFont(.body) | ||
} | ||
} | ||
``` |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters