-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Block Library - Query Pagination Next/Previous]: Add an arrow attrib…
…ute and sync next/previous block's arrow (#33656) * Query Pagination Next: Add an arrow attribute * change to a segmented control * update comment * Use CSS for RTL * formatting change * add arrow inside the link * sync next+previous icons * handle rtl for used arrows * update fixtures + polish * add small margin * update unit and control's label * use block context and handle the arrow in `QueryPagination` block * fix arrow css class * remove unneeded provider * fix fixtures Co-authored-by: ntsekouras <[email protected]>
- Loading branch information
1 parent
491eb8a
commit 7dc480d
Showing
12 changed files
with
228 additions
and
23 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
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
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
44 changes: 44 additions & 0 deletions
44
packages/block-library/src/query-pagination/query-pagination-arrow-controls.js
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/** | ||
* WordPress dependencies | ||
*/ | ||
import { __, _x } from '@wordpress/i18n'; | ||
import { | ||
__experimentalToggleGroupControl as ToggleGroupControl, | ||
__experimentalToggleGroupControlOption as ToggleGroupControlOption, | ||
} from '@wordpress/components'; | ||
|
||
export function QueryPaginationArrowControls( { value, onChange } ) { | ||
return ( | ||
<ToggleGroupControl | ||
label={ __( 'Arrow' ) } | ||
value={ value } | ||
onChange={ onChange } | ||
help={ __( | ||
'A decorative arrow appended to the next and previous page link.' | ||
) } | ||
isBlock | ||
> | ||
<ToggleGroupControlOption | ||
value="none" | ||
label={ _x( | ||
'None', | ||
'Arrow option for Query Pagination Next/Previous blocks' | ||
) } | ||
/> | ||
<ToggleGroupControlOption | ||
value="arrow" | ||
label={ _x( | ||
'Arrow', | ||
'Arrow option for Query Pagination Next/Previous blocks' | ||
) } | ||
/> | ||
<ToggleGroupControlOption | ||
value="chevron" | ||
label={ _x( | ||
'Chevron', | ||
'Arrow option for Query Pagination Next/Previous blocks' | ||
) } | ||
/> | ||
</ToggleGroupControl> | ||
); | ||
} |
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