-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(accordion): add two variations of html markup (#1990)
* feat(accordion): add two variations of html markup * fix(accordion): add period to docs * fix(accordion): updates based on Jenns review
- Loading branch information
1 parent
d7e1a24
commit aa6b851
Showing
6 changed files
with
64 additions
and
10 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
src/patternfly/components/Accordion/accordion-expanded-content.hbs
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
<dd class="pf-c-accordion__expanded-content{{#if accordion-expanded-content--IsExpanded}} pf-m-expanded{{/if}}{{#if accordion-expanded-content--IsFixed}} pf-m-fixed{{/if}}{{#if accordion-expanded-content--modifier}} {{accordion-expanded-content--modifier}}{{/if}}" | ||
<{{#if accordion--IsDefinitionList}}dd{{else}}div{{/if}} class="pf-c-accordion__expanded-content{{#if accordion-expanded-content--IsExpanded}} pf-m-expanded{{/if}}{{#if accordion-expanded-content--IsFixed}} pf-m-fixed{{/if}}{{#if accordion-expanded-content--modifier}} {{accordion-expanded-content--modifier}}{{/if}}" | ||
{{#unless accordion-expanded-content--IsExpanded}}hidden{{/unless}} | ||
{{#if accordion-expanded-content--attribute}} | ||
{{{accordion-expanded-content--attribute}}} | ||
{{/if}}> | ||
{{#> accordion-expanded-content-body}} | ||
{{> @partial-block}} | ||
{{/accordion-expanded-content-body}} | ||
</dd> | ||
</{{#if accordion--IsDefinitionList}}dd{{else}}div{{/if}}> |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<dt><h3><button class="pf-c-accordion__toggle{{#if accordion-toggle--IsExpanded}} pf-m-expanded{{/if}}{{#if accordion-toggle--modifier}} {{accordion-toggle--modifier}}{{/if}}" | ||
<{{#if accordion--IsDefinitionList}}dt>{{else}}h3>{{/if}}<button class="pf-c-accordion__toggle{{#if accordion-toggle--IsExpanded}} pf-m-expanded{{/if}}{{#if accordion-toggle--modifier}} {{accordion-toggle--modifier}}{{/if}}" | ||
{{#if accordion-toggle--attribute}} | ||
{{{accordion-toggle--attribute}}} | ||
{{/if}}> | ||
{{> @partial-block}} | ||
</button></h3></dt> | ||
</button></{{#if accordion--IsDefinitionList}}dt{{else}}h3{{/if}}> |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<dl class="pf-c-accordion{{#if accordion--modifier}} {{accordion--modifier}}{{/if}}" | ||
<{{#if accordion--IsDefinitionList}}dl{{else}}div{{/if}} class="pf-c-accordion{{#if accordion--modifier}} {{accordion--modifier}}{{/if}}" | ||
{{#if accordion--attribute}} | ||
{{{accordion--attribute}}} | ||
{{/if}}> | ||
{{> @partial-block}} | ||
</dl> | ||
</{{#if accordion--IsDefinitionList}}dl{{else}}div{{/if}}> |
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
41 changes: 41 additions & 0 deletions
41
src/patternfly/components/Accordion/examples/accordion-definition-list-example.hbs
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,41 @@ | ||
{{#> accordion accordion--IsDefinitionList="true"}} | ||
{{#> accordion-toggle accordion-toggle--attribute='aria-expanded="false"'}} | ||
{{#> accordion-toggle-text}}Item one{{/accordion-toggle-text}} | ||
{{#> accordion-toggle-icon}}{{/accordion-toggle-icon}} | ||
{{/accordion-toggle}} | ||
{{#> accordion-expanded-content}} | ||
This text is hidden | ||
{{/accordion-expanded-content}} | ||
|
||
{{#> accordion-toggle accordion-toggle--attribute='aria-expanded="false"'}} | ||
{{#> accordion-toggle-text}}Item two{{/accordion-toggle-text}} | ||
{{#> accordion-toggle-icon}}{{/accordion-toggle-icon}} | ||
{{/accordion-toggle}} | ||
{{#> accordion-expanded-content}} | ||
This text is hidden | ||
{{/accordion-expanded-content}} | ||
|
||
{{#> accordion-toggle accordion-toggle--attribute='aria-expanded="false"'}} | ||
{{#> accordion-toggle-text}}Item three{{/accordion-toggle-text}} | ||
{{#> accordion-toggle-icon}}{{/accordion-toggle-icon}} | ||
{{/accordion-toggle}} | ||
{{#> accordion-expanded-content}} | ||
This text is hidden | ||
{{/accordion-expanded-content}} | ||
|
||
{{#> accordion-toggle accordion-toggle--IsExpanded="true" accordion-toggle--attribute='aria-expanded="true"'}} | ||
{{#> accordion-toggle-text}}Item four{{/accordion-toggle-text}} | ||
{{#> accordion-toggle-icon}}{{/accordion-toggle-icon}} | ||
{{/accordion-toggle}} | ||
{{#> accordion-expanded-content accordion-expanded-content--IsExpanded="true"}} | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis molestie lorem lacinia dolor aliquet faucibus. Suspendisse gravida imperdiet accumsan. Aenean auctor lorem justo, vitae tincidunt enim blandit vel. Aenean quis tempus dolor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. | ||
{{/accordion-expanded-content}} | ||
|
||
{{#> accordion-toggle accordion-toggle--attribute='aria-expanded="false"'}} | ||
{{#> accordion-toggle-text}}Item five{{/accordion-toggle-text}} | ||
{{#> accordion-toggle-icon}}{{/accordion-toggle-icon}} | ||
{{/accordion-toggle}} | ||
{{#> accordion-expanded-content}} | ||
This text is hidden | ||
{{/accordion-expanded-content}} | ||
{{/accordion}} |
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