Skip to content

Commit

Permalink
fix: add price card to sub blocks (#744)
Browse files Browse the repository at this point in the history
  • Loading branch information
qradle-yndx authored Dec 5, 2023
1 parent a15d5ae commit dcffe83
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/models/constructor-items/sub-blocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ export type BasicCardModel = {
type: SubBlockType.BasicCard;
} & BasicCardProps;

export type PriceCardModel = {
type: SubBlockType.PriceCard;
} & PriceCardProps;

export type SubBlockModels =
| DividerModel
| QuoteModel
Expand All @@ -214,6 +218,7 @@ export type SubBlockModels =
| HubspotFormModel
| BannerCardModel
| BasicCardModel
| PriceCardModel
| LayoutItemModel;

export type SubBlock = SubBlockModels;
3 changes: 3 additions & 0 deletions src/schema/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
BasicCard,
Divider,
MediaCardBlock,
PriceCardBlock,
PriceDetailedBlock,
Quote,
} from './validators/sub-blocks';
Expand Down Expand Up @@ -61,6 +62,7 @@ export const cardSchemas = {
...BackgroundCard,
...Quote,
...BasicCard,
...PriceCardBlock,
};

export const constructorBlockSchemaNames = [
Expand Down Expand Up @@ -99,4 +101,5 @@ export const constructorCardSchemaNames = [
'quote',
'basic-card',
'layout-item',
'price-card',
];

0 comments on commit dcffe83

Please sign in to comment.