Skip to content

Commit

Permalink
test(panel, flow-item): add screenshot tests for overflow (#8028) (#8161
Browse files Browse the repository at this point in the history
)

**Related Issue:** #8028 

## Summary
Adds screenshots for panel and flow-item.
Follow-up from #8055

cc @driskull
  • Loading branch information
asangma authored and benelan committed Nov 24, 2023
1 parent b7edfdc commit 8f7e63e
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,32 @@ export const noDoubleScrollbars_TestOnly = (): string => html`
</div>
`;

export const overflowContent_TestOnly = (): string => html` <style>
.container {
max-height: 300px;
width: 300px;
}
</style>
<div class="container">
<calcite-flow>
<calcite-flow-item heading="My Panel">
<calcite-list>
<calcite-list-item label="My list item" description="My description"></calcite-list-item>
<calcite-list-item label="My list item" description="My description"></calcite-list-item>
<calcite-list-item label="My list item" description="My description"></calcite-list-item>
<calcite-list-item label="My list item" description="My description"></calcite-list-item>
<calcite-list-item label="My list item" description="My description"></calcite-list-item>
<calcite-list-item label="My list item" description="My description"></calcite-list-item>
<calcite-list-item label="My list item" description="My description"></calcite-list-item>
<calcite-list-item label="My list item" description="My description"></calcite-list-item>
<calcite-list-item label="My list item" description="My description"></calcite-list-item>
<calcite-list-item label="My list item" description="My description"></calcite-list-item>
<calcite-list-item label="My list item" description="My description"></calcite-list-item>
</calcite-list>
</calcite-flow-item>
</calcite-flow>
</div>`;

export const withActionBar_TestOnly = (): string => html`<div style="width: 300px;">
<calcite-flow-item height-scale="s">
<calcite-action-bar slot="action-bar">
Expand Down
24 changes: 24 additions & 0 deletions packages/calcite-components/src/components/panel/panel.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,30 @@ export const flexContentWithFAB_TestOnly = (): string => html`<calcite-panel
<calcite-fab slot="fab"></calcite-fab
></calcite-panel>`;

export const overflowContent_TestOnly = (): string => html` <style>
.container {
max-height: 300px;
width: 300px;
}
</style>
<div class="container">
<calcite-panel heading="My Panel">
<calcite-list>
<calcite-list-item label="My list item" description="My description"></calcite-list-item>
<calcite-list-item label="My list item" description="My description"></calcite-list-item>
<calcite-list-item label="My list item" description="My description"></calcite-list-item>
<calcite-list-item label="My list item" description="My description"></calcite-list-item>
<calcite-list-item label="My list item" description="My description"></calcite-list-item>
<calcite-list-item label="My list item" description="My description"></calcite-list-item>
<calcite-list-item label="My list item" description="My description"></calcite-list-item>
<calcite-list-item label="My list item" description="My description"></calcite-list-item>
<calcite-list-item label="My list item" description="My description"></calcite-list-item>
<calcite-list-item label="My list item" description="My description"></calcite-list-item>
<calcite-list-item label="My list item" description="My description"></calcite-list-item>
</calcite-list>
</calcite-panel>
</div>`;

export const overflowContentWithFab_TestOnly = (): string => html` <calcite-panel
style="max-height: 300px; height: 300px; width: 500px"
heading="My Panel"
Expand Down

0 comments on commit 8f7e63e

Please sign in to comment.