Skip to content

Commit

Permalink
fix(docs): show headings and icons in post cards (#2022)
Browse files Browse the repository at this point in the history
  • Loading branch information
alizedebray authored Oct 2, 2023
1 parent d487840 commit 966f2eb
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
describe('Card', () => {
it('default', () => {
cy.visit('/iframe.html?id=snapshots--card');
cy.get('.card', { timeout: 30000 }).should('be.visible');
cy.get('.card post-icon', { timeout: 30000 }).should('be.visible');
cy.percySnapshot('Cards', { widths: [1440] });
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const Alert: Story = {
: null}
${args.icon !== 'null'
? html`
<post-icon aria-hidden="true" class="alert-icon" name=${args.icon}/>
<post-icon aria-hidden="true" class="alert-icon" name=${args.icon}></post-icon>
`
: null}
${args.action
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ const Template = {
`;
} else {
const icon = html`
<post-icon aria-hidden="true" name=${args.icon}/>
<post-icon aria-hidden="true" name=${args.icon}></post-icon>
`;
const iconOnlyContent = html`
<span class="visually-hidden">${args.text}</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,10 +354,10 @@ export const CustomContent: Story = {
showHeader: true,
showFooter: true,
customHeader: `<div class="card-header d-flex">
<post-icon aria-hidden="true" class="fs-small-huge" name="3217"/>
<post-icon aria-hidden="true" class="fs-small-huge" name="3217"></post-icon>
<h3 class="fw-bold mb-0 me-auto">Detaloj de la Uzanto</h3>
<a href="#" aria-labelledby="detaloj-title">
<post-icon aria-hidden="true" class="fs-large" name="3020"/>
<post-icon aria-hidden="true" class="fs-large" name="3020"></post-icon>
<span class="visually-hidden">Administrado de kontoj</span>
</a>
</div>`,
Expand All @@ -367,14 +367,14 @@ export const CustomContent: Story = {
Mr<br>Pronomo Familinomo<br>Strato 1<br>1234 Urbo
</address>
<a href="#">
<post-icon aria-label="Redaktu adreson" class="fs-large" name="3193"/>
<post-icon aria-label="Redaktu adreson" class="fs-large" name="3193"></post-icon>
<span class="visually-hidden">Redaktu adreson</span>
</a>
</li>
<li class="list-group-item d-flex align-items-center justify-content-between">
<p class="mb-0">Lingvo: <span class="fw-bold">Germana</span></p>
<a href="#">
<post-icon aria-label="Redakti lingvon" class="fs-large" name="3193"/>
<post-icon aria-label="Redakti lingvon" class="fs-large" name="3193"></post-icon>
<span class="visually-hidden">Redakti lingvon</span>
</a>
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,11 @@ export const TableWithButtons: Story = {
<td>
<button class="btn btn-secondary btn-icon btn-md">
<span class="visually-hidden">Edit</span>
<post-icon aria-hidden="true" name="2012"/>
<post-icon aria-hidden="true" name="2012"></post-icon>
</button>
<button class="btn btn-primary btn-icon btn-md ms-2">
<span class="visually-hidden">Edit</span>
<post-icon aria-hidden="true" name="3193"/>
<post-icon aria-hidden="true" name="3193"></post-icon>
</button>
</td>
</tr>
Expand All @@ -196,11 +196,11 @@ export const TableWithButtons: Story = {
<td>
<button class="btn btn-secondary btn-icon btn-md">
<span class="visually-hidden">Edit</span>
<post-icon aria-hidden="true" name="2012"/>
<post-icon aria-hidden="true" name="2012"></post-icon>
</button>
<button class="btn btn-primary btn-icon btn-md ms-2">
<span class="visually-hidden">Edit</span>
<post-icon aria-hidden="true" name="3193"/>
<post-icon aria-hidden="true" name="3193"></post-icon>
</button>
</td>
</tr>
Expand All @@ -211,11 +211,11 @@ export const TableWithButtons: Story = {
<td>
<button class="btn btn-secondary btn-icon btn-md">
<span class="visually-hidden">Edit</span>
<post-icon aria-hidden="true" name="2012"/>
<post-icon aria-hidden="true" name="2012"></post-icon>
</button>
<button class="btn btn-primary btn-icon btn-md ms-2">
<span class="visually-hidden">Edit</span>
<post-icon aria-hidden="true" name="3193"/>
<post-icon aria-hidden="true" name="3193"></post-icon>
</button>
</td>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ function render(args: Args, context: StoryContext) {
const toastIcon =
!args.noIcon && args.icon !== 'null'
? html`
<post-icon aria-hidden="true" name=${args.icon}/>
<post-icon aria-hidden="true" name=${args.icon}></post-icon>
`
: null;

Expand Down

0 comments on commit 966f2eb

Please sign in to comment.