Skip to content

Commit c143263

Browse files
leksaBoikoraoufswexander-marjoram
authored
docs(pie-docs): DSW-2333 update overview and code documentation (#1860)
* docs(pie-docs): DSW-2333 update overview and code documentation * fix typo Co-authored-by: Raouf <[email protected]> * fix(pie-docs): DSW-2333 add paragraph decription * fix after review Co-authored-by: Xander Marjoram <[email protected]> --------- Co-authored-by: Raouf <[email protected]> Co-authored-by: Xander Marjoram <[email protected]>
1 parent b4b5129 commit c143263

File tree

7 files changed

+133
-13
lines changed

7 files changed

+133
-13
lines changed

.changeset/warm-mirrors-sell.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"pie-docs": patch
3+
---
4+
5+
[Changed] - updated `pie-divider` overview and code documentation
Loading

apps/pie-docs/src/assets/img/components/divider/example-menu.svg

+46-1
Loading
Loading
Loading

apps/pie-docs/src/components/divider/code/props.json

+17-3
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,39 @@
11
{
2-
"headings": ["Prop", "Options", "Description", "Default"],
2+
"headings": ["Prop", "Type", "Description", "Default"],
33
"rows": [
44
[
55
"variant",
66
{
77
"type": "code",
88
"item": ["\"default\"", "\"inverse\""]
99
},
10-
"Which variant of the divider to use.",
10+
"Sets the variant of the divider.",
1111
{
1212
"type": "code",
1313
"item": ["\"default\""]
1414
}
1515
],
16+
[
17+
"label",
18+
{
19+
"type": "code",
20+
"item": [
21+
"string"
22+
]
23+
},
24+
"The label text for the divider. Label is only available for the horizontal variant.",
25+
{
26+
"type": "code",
27+
"item": ["\"\""]
28+
}
29+
],
1630
[
1731
"orientation",
1832
{
1933
"type": "code",
2034
"item": ["\"horizontal\"", "\"vertical\""]
2135
},
22-
"Which orientation of the divider to use.",
36+
"Sets the orientation of the divider.",
2337
{
2438
"type": "code",
2539
"item": ["\"horizontal\""]

apps/pie-docs/src/components/divider/overview/overview.md

+44-7
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ ___
5151
{% list {
5252
type: listTypes.ordered,
5353
items: [
54-
"**Divider:** 1px line."
54+
"**Divider:** 1px line.",
55+
"**Label:** Text that describes the content split by the divider."
5556
]
5657
} %}
5758

@@ -103,11 +104,45 @@ ___
103104
{% endcontentItem %}
104105
{% endcontentLayout %}
105106

107+
### Label
108+
109+
Label is only available for the horizontal variant.
110+
111+
{% contentLayout %}
112+
{% contentItem %}
113+
<h4>Without label</h4>
114+
<p><br/></p>
115+
{% contentPageImage {
116+
src: "../../../assets/img/components/divider/modifier-type-default.svg",
117+
width: 1,
118+
alt: "A default divider without label."
119+
} %}
120+
{% endcontentItem %}
121+
{% contentItem %}
122+
<h4>With label</h4>
123+
<p>Dividers on both sides have a minimum width of 16px.</p>
124+
{% contentPageImage {
125+
src: "../../../assets/img/components/divider/modifier-type-default-label.svg",
126+
width: 1,
127+
alt: "A default divider with label."
128+
} %}
129+
{% endcontentItem %}
130+
{% endcontentLayout %}
131+
132+
---
133+
134+
## Content
135+
136+
- Ensure the label is clear and concise, giving users immediate understanding of the separated content.
137+
- Use sentence case.
138+
106139
---
107140

108141
## Examples
109142

110-
Outlines the atomic level interactive elements for the component.
143+
### LTR examples
144+
145+
Here are some examples of the component in a left-to-right context:
111146

112147
{% contentLayout %}
113148
{% contentItem %}
@@ -126,15 +161,17 @@ Outlines the atomic level interactive elements for the component.
126161
{% endcontentItem %}
127162
{% endcontentLayout %}
128163

129-
---
130-
131-
## Resources
164+
### RTL examples
132165

133166
{% notification {
134-
type: "warning",
135-
message: "We’re currently working on updating our Divider documentation, please see the resources below."
167+
type: "information",
168+
message: "Divider stays the same in RTL."
136169
} %}
137170

171+
---
172+
173+
## Resources
174+
138175
{% resourceTable {
139176
componentName: 'Divider'
140177
} %}

0 commit comments

Comments
 (0)