You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: elements/pfe-content-set/README.md
+9-18Lines changed: 9 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,35 +3,26 @@
3
3
4
4
## Overview
5
5
6
-
`pfe-content-set` is a combo component, which brings together the utilities of the accordion and tabs components. Effectively both of these components do the same job, which is to encapsulate chunks of information under headings for easier browsing. Hiding some information and allowing the user to toggle through the headings to show other bits of information.
6
+
`pfe-content-set` is a combo component, which brings together the utilities of the accordion and tabs components. Effectively both of these components do the same job, which is to encapsulate chunks of information under headings for easier browsing. Hiding some information and allowing the user to toggle through the headings to show other bits of information.
7
7
8
8
Since tabs can pose a layout issue on mobile because of the lack of horizontal space, this component will first assess the width of the parent container. If the width is less than 768px, the component will render the content within the `<pfe-accordion>` component. If it is larger than this value, the content will be rendered inside the `<pfe-tabs>` component.
9
9
10
10
## Dependencies
11
11
12
12
Requires both the `pfe-accordion` and `pfe-tabs` components, as well as the base `pfelement`.
13
13
14
-
15
14
## Usage
16
15
17
-
You must wrap each chunk of information (heading + content) in a `<pfe-content-set-group>` tag.
18
-
19
-
You must also apply the `pfe-heading` to the HTML heading element, like an H2 or H3. Otherwise content within the component will not be rendered.
16
+
Each header must have an attribute of `pfe-content-set--header` and each panel must have an attribute of `pfe-content-set--panel`. Each header must be immediately followed by a panel.
20
17
21
18
```html
22
19
<pfe-content-set>
23
-
<pfe-content-set-group>
24
-
<h2pfe-heading>Heading 1</h2>
25
-
<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore </p>
26
-
</pfe-content-set-group>
27
-
<pfe-content-set-group>
28
-
<h2pfe-heading>Heading 2</h2>
29
-
<p>Consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam volu et jen, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
30
-
</pfe-content-set-group>
31
-
<pfe-content-set-group>
32
-
<h2pfe-heading>Heading 3</h2>
33
-
<p>At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</p>
34
-
</pfe-content-set-group>
20
+
<h2pfe-content-set--header>Heading 1</h2>
21
+
<ppfe-content-set--panel>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore </p>
22
+
<h2pfe-content-set--header>Heading 2</h2>
23
+
<ppfe-content-set--panel>Consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam volu et jen, no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>
24
+
<h2pfe-content-set--header>Heading 3</h2>
25
+
<ppfe-content-set--panel>At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.</p>
35
26
</pfe-content-set>
36
27
37
28
```
@@ -48,7 +39,7 @@ You must also apply the `pfe-heading` to the HTML heading element, like an H2 or
48
39
- Tabs: Borders are removed, only an indicator appears under the active heading.
49
40
-`pfe-variant="secondary"`
50
41
- Accordion: Headings are on a dark background, text color is reversed.
51
-
- Tabs: Headings are encased in a block. The active heading is solid, with a caret pointing downward towards the content. Other headings have a border with no fill.
42
+
- Tabs: Headings are encased in a block. The active heading is solid, with a caret pointing downward towards the content. Other headings have a border with no fill.
52
43
-`vertical`
53
44
- Accordion: No effect.
54
45
- Tabs: Headings stack on the left, content pane is shown on the right.
0 commit comments