Skip to content

Commit

Permalink
feat: new DecorativePalette type for when they can be used as palette (
Browse files Browse the repository at this point in the history
  • Loading branch information
Supamiu authored Oct 16, 2024
1 parent 7019ad6 commit 1f7fe2d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/ng/core/type/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
// primary is deprecated
// grey is deprecated
export type Palette = 'success' | 'warning' | 'error' | 'product' | 'neutral' | 'none' | 'primary' | 'grey';
export type DecorativePalette = 'kiwi' | 'lime' | 'cucumber' | 'mint' | 'glacier' | 'lagoon' | 'blueberry' | 'lavender' | 'grape' | 'watermelon' | 'pumpkin' | 'pineapple';
4 changes: 2 additions & 2 deletions packages/ng/tag/tag.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { NgClass } from '@angular/common';
import { booleanAttribute, ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@angular/core';
import { RouterLink } from '@angular/router';
import { LuccaIcon } from '@lucca-front/icons';
import { Palette } from '@lucca-front/ng/core';
import { DecorativePalette, Palette } from '@lucca-front/ng/core';
import { IconComponent } from '@lucca-front/ng/icon';

@Component({
Expand All @@ -29,7 +29,7 @@ export class TagComponent {
* Which palette should be used for the entire callout.
* Defaults to none (inherits parent palette)
*/
palette: Palette = 'none';
palette: Palette | DecorativePalette = 'none';

@Input({ transform: booleanAttribute })
/**
Expand Down

0 comments on commit 1f7fe2d

Please sign in to comment.