Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions packages/calcite-components/src/components/panel/panel.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ export default {
},
};

const headerHTML = `<h3 class="heading" slot="${SLOTS.headerContent}">Heading</h3>`;

const contentHTML = html`
<p>
Enim nascetur erat faucibus ornare varius arcu fames bibendum habitant felis elit ante. Nibh morbi massa curae; leo
Expand Down Expand Up @@ -93,7 +91,7 @@ const footerHTML = html`
<calcite-button slot="${SLOTS.footerEnd}" width="half">Footer end</calcite-button>
`;

const panelContent = `${headerHTML}
const panelContent = `
<calcite-action text="Action" label="Action" slot="${SLOTS.headerActionsStart}" icon="bluetooth"></calcite-action>
<calcite-action text="Action" label="Action" slot="${SLOTS.headerActionsEnd}" icon="attachment"></calcite-action>
${contentHTML}
Expand Down Expand Up @@ -153,7 +151,15 @@ export const withDescriptionAndIcon = (): string => html`
`;

export const darkModeRTL_TestOnly = (): string => html`
<calcite-panel collapse-direction="down" height-scale="m" dir="rtl" class="calcite-mode-dark">
<calcite-panel
collapse-direction="down"
height-scale="m"
dir="rtl"
class="calcite-mode-dark"
heading="Heading"
icon="arrow-bold-left"
icon-flip-rtl
>
${panelContent}
</calcite-panel>
`;
Expand Down
7 changes: 6 additions & 1 deletion packages/calcite-components/src/components/panel/panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,12 @@ export class Panel extends LitElement implements InteractiveComponent {
const { heading, headingLevel, description, hasHeaderContent, icon, scale } = this;

const iconNode = icon ? (
<calcite-icon class={CSS.icon} icon={icon} scale={getIconScale(scale)} />
<calcite-icon
class={CSS.icon}
flipRtl={this.iconFlipRtl}
icon={icon}
scale={getIconScale(scale)}
/>
) : null;

const headingNode = heading ? (
Expand Down
Loading