Skip to content

Commit

Permalink
chore: theme pipes add types
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhenggang Su committed Jan 16, 2023
1 parent 1aa94c3 commit 374d841
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/three-buses-do.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@alauda/ui': patch
---

fix: theme pipes add types
6 changes: 3 additions & 3 deletions src/theme/theme.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ import { cssVar, rgbColor, rgbaColor } from './utils';

@Pipe({ name: 'auiRgbColor', pure: true })
export class RgbColorPipe implements PipeTransform {
transform = rgbColor;
transform: (color: string) => string = rgbColor;
}

@Pipe({ name: 'auiRgbaColor', pure: true })
export class RgbaColorPipe implements PipeTransform {
transform = rgbaColor;
transform: ([color, opacity]: [string, number]) => string = rgbaColor;
}

@Pipe({ name: 'auiCssVar', pure: true })
export class CssVarPipe implements PipeTransform {
transform = cssVar;
transform: (value: string) => string = cssVar;
}

@Pipe({ name: 'auiThemePicker', pure: false })
Expand Down

0 comments on commit 374d841

Please sign in to comment.