Skip to content

Commit

Permalink
add vertical link and unlink icons
Browse files Browse the repository at this point in the history
  • Loading branch information
madhusudhand committed Dec 20, 2024
1 parent f80e59c commit 1088d85
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* WordPress dependencies
*/
import { Button, Tooltip } from '@wordpress/components';
import { link, linkOff } from '@wordpress/icons';
import { linkOffVertical, linkVertical } from '@wordpress/icons';
import { __ } from '@wordpress/i18n';

export default function LinkedButton( { isLinked, ...props } ) {
Expand All @@ -13,7 +13,7 @@ export default function LinkedButton( { isLinked, ...props } ) {
<Button
{ ...props }
size="small"
icon={ isLinked ? link : linkOff }
icon={ isLinked ? linkVertical : linkOffVertical }
iconSize={ 24 }
aria-label={ label }
/>
Expand Down
2 changes: 2 additions & 0 deletions packages/icons/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ export { default as lineDotted } from './library/line-dotted';
export { default as lineSolid } from './library/line-solid';
export { default as link } from './library/link';
export { default as linkOff } from './library/link-off';
export { default as linkVertical } from './library/link-vertical';
export { default as linkOffVertical } from './library/link-off-vertical';
export { default as list } from './library/list';
export { default as listItem } from './library/list-item';
export { default as listView } from './library/list-view';
Expand Down
16 changes: 16 additions & 0 deletions packages/icons/src/library/link-off-vertical.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
* WordPress dependencies
*/
import { SVG, Path } from '@wordpress/primitives';

const linkOffVertical = (
<SVG
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
style={ { transform: 'rotateZ(90deg) rotateY(180deg)' } }
>
<Path d="M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z" />
</SVG>
);

export default linkOffVertical;
16 changes: 16 additions & 0 deletions packages/icons/src/library/link-vertical.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
* WordPress dependencies
*/
import { SVG, Path } from '@wordpress/primitives';

const linkVertical = (
<SVG
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
style={ { transform: 'rotate(90deg)' } }
>
<Path d="M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z" />
</SVG>
);

export default linkVertical;

0 comments on commit 1088d85

Please sign in to comment.