@@ -4,7 +4,7 @@ import { LitElement, html, svg } from 'lit';
44import { customElement , property , query , state } from 'lit/decorators.js' ;
55import { styleMap } from 'lit/directives/style-map.js' ;
66
7- import { pfelement , bound , observed } from '@patternfly/pfe-core/decorators.js' ;
7+ import { pfelement , bound , observed , colorContextConsumer } from '@patternfly/pfe-core/decorators.js' ;
88import { getRandomId } from '@patternfly/pfe-core/functions/random.js' ;
99import { Logger } from '@patternfly/pfe-core/controllers/logger.js' ;
1010
@@ -13,6 +13,7 @@ import { PfeIconSet } from './icon-set.js';
1313import { addBuiltIns } from './builtin-icon-sets.js' ;
1414
1515import style from './pfe-icon.scss' ;
16+ import { ColorTheme } from '@patternfly/pfe-core' ;
1617
1718export type IconColor = (
1819 | 'accent'
@@ -141,6 +142,12 @@ export class PfeIcon extends LitElement {
141142
142143 @property ( { type : Boolean , reflect : true } ) block = false ;
143144
145+ /**
146+ * Sets color theme based on parent context
147+ */
148+ @colorContextConsumer ( )
149+ @property ( { reflect : true } ) on ?: ColorTheme ;
150+
144151 @state ( ) private _iconHref = '' ;
145152
146153 @state ( ) private _filterId ?: string ;
0 commit comments