diff --git a/.changeset/wet-masks-hear.md b/.changeset/wet-masks-hear.md
new file mode 100644
index 0000000000..d66a86320c
--- /dev/null
+++ b/.changeset/wet-masks-hear.md
@@ -0,0 +1,5 @@
+---
+"@patternfly/pfe-cta": patch
+---
+
+Removes color context provider, reverting back to color attribute
diff --git a/elements/pfe-cta/demo/pfe-cta.html b/elements/pfe-cta/demo/pfe-cta.html
index 705c50b0e3..e2e8f2170f 100644
--- a/elements/pfe-cta/demo/pfe-cta.html
+++ b/elements/pfe-cta/demo/pfe-cta.html
@@ -25,24 +25,24 @@
No color-palette attribute
- color-palette="base"
+ color="base"
- color-palette="accent"
+ color="accent"
@@ -65,25 +65,25 @@ No color-palette attribute
- color-palette="base"
+ color="base"
- color-palette="accent"
+ color="accent"
@@ -107,24 +107,24 @@ No color-palette attribute
- color-palette="base"
+ color="base"
- color-palette="accent"
+ color="accent"
@@ -173,8 +173,8 @@ Color responsive
Color override
@@ -196,11 +196,11 @@ Color responsive
Color override
diff --git a/elements/pfe-cta/pfe-cta.scss b/elements/pfe-cta/pfe-cta.scss
index 86a41dda5c..5532d7d143 100644
--- a/elements/pfe-cta/pfe-cta.scss
+++ b/elements/pfe-cta/pfe-cta.scss
@@ -159,7 +159,7 @@
// Primary omitted because it already uses the accent color
-:host([priority="secondary"][color-palette="accent"]) {
+:host([priority="secondary"][color="accent"]) {
@include pfe-print-local($secondary-accent);
}
@@ -167,11 +167,11 @@
/// COLOR=BASE
/// ===========================================================================
-:host([priority="primary"][color-palette="base"]) {
+:host([priority="primary"][color="base"]) {
@include pfe-print-local($primary-base);
}
-:host([priority="secondary"][color-palette="base"]) {
+:host([priority="secondary"][color="base"]) {
@include pfe-print-local($secondary-base);
}
diff --git a/elements/pfe-cta/pfe-cta.ts b/elements/pfe-cta/pfe-cta.ts
index c9309d259b..5ab907f785 100644
--- a/elements/pfe-cta/pfe-cta.ts
+++ b/elements/pfe-cta/pfe-cta.ts
@@ -9,8 +9,6 @@ import { Logger } from '@patternfly/pfe-core/controllers/logger.js';
import {
bound,
colorContextConsumer,
- colorContextProvider,
- deprecation,
initializer,
pfelement,
} from '@patternfly/pfe-core/decorators.js';
@@ -96,24 +94,14 @@ export class PfeCta extends LitElement {
*/
@property({ reflect: true }) priority?: 'primary'|'secondary';
- /**
- * Sets color palette, which affects the element's styles as well as descendants' color theme.
- * Overrides parent color context.
- * Your theme will influence these colors so check there first if you are seeing inconsistencies.
- * See [CSS Custom Properties](#css-custom-properties) for default values
- */
- @colorContextProvider()
- @property({ reflect: true, attribute: 'color-palette' }) colorPalette?: ColorPalette;
-
- /** @deprecated use `color-palette` */
- @deprecation({ alias: 'colorPalette', attribute: 'color' }) color?: ColorPalette;
-
/**
* Sets color theme based on parent context
*/
@colorContextConsumer()
@property({ reflect: true }) on?: ColorTheme;
+ @property({ reflect: true, attribute: 'color' }) color?: 'accent' | 'base' | null;
+
/**
* `priority="secondary"` has a `wind` variant (`variant="wind"`) that can be applied to change the style of the secondary call-to-action.
*