This repository has been archived by the owner on Feb 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add product query support for Sale badge block (#7709)
* Add product query support for Sale badge block On the client side, when the Sale badge block is used within the product query block, the markup will be rendered on the server side - No javascript related to Sale badge block will be rendered. * Add support for additional CSS class(es) ADDITIONAL CSS CLASS(ES)(available in advanced toggle in sidebar) should be added to the container div * Convert preset to css variable for padding We are getting padding value in preset format like this: "var:preset|spacing|50" Therefore I added a function to convert it to CSS variable like this: "var(--wp--preset--spacing--50)" i.e. "var:preset|spacing|50" -> "var(--wp--preset--spacing--50)" * Add reference for preset to css variable conversion logic
- Loading branch information
1 parent
74a1719
commit 9b3f5c2
Showing
7 changed files
with
4,334 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
export interface BlockAttributes { | ||
productId: number; | ||
align: 'left' | 'center' | 'right'; | ||
isDescendentOfQueryLoop: boolean; | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters