Skip to content

Commit 18d71f8

Browse files
Valent1325Maksim Malofeev
andauthored
fix(BasicCard): mark property hoverBackgroundColor as deprecated (#1356)
Co-authored-by: Maksim Malofeev <mmalofeev8@172.27.53.182-red3.dhcp.yndx.net>
1 parent 38a50ed commit 18d71f8

File tree

6 files changed

+11
-4
lines changed

6 files changed

+11
-4
lines changed

memory-bank/activeContext.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ Recent development has focused on:
6767

6868
10. **Hover Background Color Enhancement**: Added support for customizable hover background colors in BasicCard component:
6969

70-
- **Schema Support**: Added `hoverBackgroundColor` property to BasicCard schema as optional string field
71-
- **Component Implementation**: BasicCard component now accepts `hoverBackgroundColor` prop and applies it as CSS custom property `--hover-background-color`
70+
- **Schema Support**: Added `hoverBackgroundColor` property to BasicCard schema as optional string field (**deprecated**)
71+
- **Component Implementation**: BasicCard component now accepts `hoverBackgroundColor` prop and applies it as CSS custom property `--hover-background-color` (**deprecated**)
7272
- **CSS Integration**: Uses existing `background-hover()` mixin in CardBase component that applies the custom property on hover
7373
- **Flexible Styling**: Allows any valid CSS color value (hex, rgb, rgba, named colors, etc.)
7474
- **Backward Compatibility**: Optional property that doesn't affect existing implementations

src/models/constructor-items/sub-blocks.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,9 @@ export interface BasicCardProps
166166
gravityIcon?: ThemeSupporting<GravityIconProps>;
167167
target?: string;
168168
iconPosition?: IconPosition;
169+
/**
170+
* @deprecated This property will be removed in future versions
171+
*/
169172
hoverBackgroundColor?: string;
170173
}
171174

src/sub-blocks/BasicCard/BasicCard.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const BasicCard = (props: BasicCardProps) => {
2424
controlPosition = 'content',
2525
size = 's',
2626
gravityIcon,
27+
/** @deprecated This property will be removed in future versions */
2728
hoverBackgroundColor,
2829
...cardParams
2930
} = props;

src/sub-blocks/BasicCard/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616

1717
`border: 'shadow' | 'line' | 'none'` — Card border properties (defaults to `'shadow'`).
1818

19-
`hoverBackgroundColor?: string` - Card hover background color
19+
`hoverBackgroundColor?: string` - Card hover background color (**deprecated**, will be removed in future versions)

src/sub-blocks/BasicCard/__stories__/BasicCard.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ For a detailed usage guide of the BasicCard sub-block, see [BasicCard Usage](htt
4040

4141
`target?: '_blank' | '_parent' | '_top' | '_self'` — Target for the URL
4242

43-
`hoverBackgroundColor?: string` - Card hover background color
43+
`hoverBackgroundColor?: string` - Card hover background color (**deprecated**, will be removed in future versions)
4444

4545
</StoryTemplate>

src/sub-blocks/BasicCard/schema.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ export const BasicCard = {
4040
type: 'string',
4141
enum: ['content', 'footer'],
4242
},
43+
/**
44+
* @deprecated This property will be removed in future versions
45+
*/
4346
hoverBackgroundColor: {
4447
type: 'string',
4548
},

0 commit comments

Comments
 (0)