-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(panel): apply custom styles correctly to header actions (#11495)
**Related Issue:** #11491 #8675 #7180 ## Summary Allow calcite-actions to be styled specific to the panel-header. include `::slotted(calcite-action)` in selectors and set proper variable fallbacks Correctly pass corner-radius through the component --------- Co-authored-by: JC Franco <[email protected]>
- Loading branch information
1 parent
4577177
commit fd64b84
Showing
6 changed files
with
87 additions
and
61 deletions.
There are no files selected for viewing
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
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
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
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
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,37 @@ | ||
import { html } from "../../support/formatting"; | ||
|
||
export const panelTokens = { | ||
calcitePanelBackgroundColor: "", | ||
calcitePanelBorderColor: "", | ||
calcitePanelContentSpace: "", | ||
calcitePanelCornerRadius: "", | ||
calcitePanelDescriptionTextColor: "", | ||
calcitePanelFooterBackgroundColor: "", | ||
calcitePanelFooterSpace: "", | ||
calcitePanelHeaderActionBackgroundColorHover: "", | ||
calcitePanelHeaderActionBackgroundColorPress: "", | ||
calcitePanelHeaderActionBackgroundColor: "", | ||
calcitePanelHeaderActionTextColorPress: "", | ||
calcitePanelHeaderActionTextColor: "", | ||
calcitePanelHeaderBackgroundColor: "", | ||
calcitePanelHeaderContentSpace: "", | ||
calcitePanelHeadingTextColor: "", | ||
calcitePanelSpace: "", | ||
}; | ||
|
||
export const panel = html` | ||
<calcite-panel heading="Panel Heading" description="Panel description" closable collapsible> | ||
<calcite-action text="Action 1" text-enabled icon="icon1" slot="header-menu-actions"></calcite-action> | ||
<calcite-action text="Action 2" text-enabled icon="icon2" slot="header-menu-actions"></calcite-action> | ||
<calcite-action text="Action 3" icon="icon3" slot="header-actions-end"></calcite-action> | ||
<div slot="content-top">Content at the top</div> | ||
<calcite-label slot="content-bottom" layout="inline-space-between" style="--calcite-label-margin-bottom: 0"> | ||
<calcite-checkbox></calcite-checkbox>Agree to terms | ||
</calcite-label> | ||
<p> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante | ||
dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. | ||
</p> | ||
<calcite-button slot="footer-end">Done</calcite-button> | ||
</calcite-panel> | ||
`; |
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