chore(ui,icons,ui-preset,toolbox): Move design system packages to monorepo (#5470)
This commit is contained in:
committed by
GitHub
parent
71853eafdd
commit
e4ce2f4e07
@@ -0,0 +1,42 @@
|
||||
import {
|
||||
Effect,
|
||||
EffectBlur,
|
||||
EffectShadow,
|
||||
EffectType,
|
||||
Paint,
|
||||
PaintGradient,
|
||||
PaintImage,
|
||||
PaintSolid,
|
||||
PaintType,
|
||||
} from "./types"
|
||||
|
||||
export function isEffectShadow(effect: Effect): effect is EffectShadow {
|
||||
return (
|
||||
effect.type === EffectType.DROP_SHADOW ||
|
||||
effect.type === EffectType.INNER_SHADOW
|
||||
)
|
||||
}
|
||||
|
||||
export function isEffectBlur(effect: Effect): effect is EffectBlur {
|
||||
return (
|
||||
effect.type === EffectType.BACKGROUND_BLUR ||
|
||||
effect.type === EffectType.LAYER_BLUR
|
||||
)
|
||||
}
|
||||
|
||||
export function isPaintSolid(paint: Paint): paint is PaintSolid {
|
||||
return paint.type === PaintType.SOLID
|
||||
}
|
||||
|
||||
export function isPaintGradient(paint: Paint): paint is PaintGradient {
|
||||
return (
|
||||
paint.type === PaintType.GRADIENT_ANGULAR ||
|
||||
paint.type === PaintType.GRADIENT_DIAMOND ||
|
||||
paint.type === PaintType.GRADIENT_LINEAR ||
|
||||
paint.type === PaintType.GRADIENT_RADIAL
|
||||
)
|
||||
}
|
||||
|
||||
export function isPaintImage(paint: Paint): paint is PaintImage {
|
||||
return paint.type === PaintType.IMAGE
|
||||
}
|
||||
Reference in New Issue
Block a user