Skip to content

Commit e63bde9

Browse files
authored
Merge pull request #317 from dev-five-git/add-mask-shortcut
Add mask shortcut
2 parents a829dbd + 152b719 commit e63bde9

File tree

5 files changed

+21
-0
lines changed

5 files changed

+21
-0
lines changed

.changeset/six-owls-thank.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@devup-ui/react": patch
3+
---
4+
5+
Add maskPos, maskImg

libs/css/src/constant.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ pub(super) static GLOBAL_STYLE_PROPERTY: phf::Map<&str, &[&str]> = phf_map! {
2828
"bgClip" => &["background-clip"],
2929
"bgColor" => &["background-color"],
3030
"bgImage" => &["background-image"],
31+
"bgImg" => &["background-image"],
3132
"bgOrigin" => &["background-origin"],
3233
"bgPosition" => &["background-position"],
3334
"bgPositionX" => &["background-position-x"],
@@ -38,6 +39,7 @@ pub(super) static GLOBAL_STYLE_PROPERTY: phf::Map<&str, &[&str]> = phf_map! {
3839
"bgRepeat" => &["background-repeat"],
3940
"bgSize" => &["background-size"],
4041
"bgBlendMode" => &["background-blend-mode"],
42+
"backgroundImg" => &["background-image"],
4143
"animationDir" => &["animation-direction"],
4244
"flexDir" => &["flex-direction"],
4345
"pos" => &["position"],
@@ -68,6 +70,8 @@ pub(super) static GLOBAL_STYLE_PROPERTY: phf::Map<&str, &[&str]> = phf_map! {
6870
"borderRightRadius" => &["border-top-right-radius", "border-bottom-right-radius"],
6971
"objectPos" => &["object-position"],
7072
"offsetPos" => &["offset-position"],
73+
"maskPos" => &["mask-position"],
74+
"maskImg" => &["mask-image"],
7175
};
7276
pub(super) static OPTIMIZE_MULTI_CSS_VALUE_PROPERTY: phf::Set<&str> = phf_set! {
7377
"font-family",

packages/react/src/types/props/background.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,6 @@ export interface DevupUiBackgroundProps {
1919
bgRepeat?: ResponsiveValue<Property.BackgroundRepeat>
2020
bgSize?: ResponsiveValue<Property.BackgroundSize>
2121
bgBlendMode?: ResponsiveValue<Property.BackgroundBlendMode>
22+
backgroundImg?: ResponsiveValue<Property.BackgroundImage>
23+
bgImg?: ResponsiveValue<Property.BackgroundImage>
2224
}

packages/react/src/types/props/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import type { DevupUiBoxModelProps } from './box-model'
88
import type { DevupUiBoxSizingProps } from './box-sizing'
99
import type { DevupUiFlexProps } from './flex'
1010
import type { DevupUiImageProps } from './image'
11+
import type { DevupUiMaskProps } from './mask'
1112
import type { DevupUiMotionPathProps } from './motion-path'
1213
import type { DevupUiPositionProps } from './position'
1314
import type { DevupSelectorProps, DevupThemeSelectorProps } from './selector'
@@ -22,6 +23,7 @@ export interface DevupShortcutsProps
2223
DevupUiImageProps,
2324
DevupUiMotionPathProps,
2425
DevupUiPositionProps,
26+
DevupUiMaskProps,
2527
DevupUiTextProps {}
2628

2729
export type DevupCommonProps = Merge<
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import type { Property } from 'csstype'
2+
3+
import type { ResponsiveValue } from '../responsive-value'
4+
5+
export interface DevupUiMaskProps {
6+
maskPos?: ResponsiveValue<Property.MaskPosition>
7+
maskImg?: ResponsiveValue<Property.MaskImage>
8+
}

0 commit comments

Comments
 (0)