diff --git a/docs/pages/components/chip.md b/docs/pages/components/chip.md
index 11cfebee2..f04eff7bb 100644
--- a/docs/pages/components/chip.md
+++ b/docs/pages/components/chip.md
@@ -50,9 +50,11 @@ layout: component
## Examples
-### First Example
+### Tooltip Example
-TODO
+```html:preview
+Tooltip Test
+```
### Second Example
diff --git a/src/components/chip/chip.component.ts b/src/components/chip/chip.component.ts
index acb77e5fc..bf9e91d69 100644
--- a/src/components/chip/chip.component.ts
+++ b/src/components/chip/chip.component.ts
@@ -24,51 +24,58 @@ import styles from './chip.scss';
* @cssproperty --example - An example CSS custom property.
*/
export default class ZnChip extends ZincElement {
- static styles: CSSResultGroup = unsafeCSS(styles);
+ static styles: CSSResultGroup = unsafeCSS(styles);
- @property() icon: string = '';
+ @property() icon: string = '';
+ @property() tooltip: string = '';
- @property() type: 'info' | 'success' | 'warning' | 'error' | 'primary' |
- 'transparent' | 'custom' | 'neutral' = 'neutral';
+ @property() type: 'info' | 'success' | 'warning' | 'error' | 'primary' |
+ 'transparent' | 'custom' | 'neutral' = 'neutral';
- @property() size: 'small' | 'medium' | 'large'; // Defaults to base chip styling
+ @property() size: 'small' | 'medium' | 'large'; // Defaults to base chip styling
- @property({attribute: 'flush', type: Boolean, reflect: true}) flush: boolean = false;
- @property({attribute: 'flush-x', type: Boolean, reflect: true}) flushX: boolean = false;
- @property({attribute: 'flush-y', type: Boolean, reflect: true}) flushY: boolean = false;
+ @property({attribute: 'flush', type: Boolean, reflect: true}) flush: boolean = false;
+ @property({attribute: 'flush-x', type: Boolean, reflect: true}) flushX: boolean = false;
+ @property({attribute: 'flush-y', type: Boolean, reflect: true}) flushY: boolean = false;
- private readonly hasSlotController = new HasSlotController(this, '[default]', 'action');
+ private readonly hasSlotController = new HasSlotController(this, '[default]', 'action');
- render() {
- const hasContent = this.hasSlotController.test('[default]')
- return html`
-
- ${this.icon ? html`
- ` : ''}
- ${hasContent ? html`
- ` : ''}
- ${this.hasSlotController.test('action') ? html`
- ` : ''}
-
- `;
- }
+ render() {
+ return html`
+ ${this.tooltip ? html`
+ ${this.getContent()}` : html`${this.getContent()}`}
+ `;
+ }
+
+ getContent() {
+ const hasContent = this.hasSlotController.test('[default]');
+ return html`
+
+ ${this.icon ? html`
+ ` : ''}
+ ${hasContent ? html`
+ ` : ''}
+ ${this.hasSlotController.test('action') ? html`
+ ` : ''}
+
`
+ }
}