forked from woocommerce/woocommerce
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update variation visibility icon in variations table (woocommerce#40150)
* Create re-usuable hidden icon and re-use in variations table * Add changelog
- Loading branch information
Showing
8 changed files
with
56 additions
and
64 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
packages/js/product-editor/changelog/update-40072_variation_visibility_icon
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,4 @@ | ||
Significance: minor | ||
Type: update | ||
|
||
Remove visibility toggle from variations table and remove with tooltip icon. |
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
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions
14
packages/js/product-editor/src/icons/hidden-with-help-icon.scss
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,14 @@ | ||
.woocommerce-hidden-with-help-icon { | ||
display: flex; | ||
align-items: center; | ||
position: relative; | ||
|
||
&__hidden-icon { | ||
color: $gray-600; | ||
} | ||
&__help-icon { | ||
position: absolute; | ||
right: -2px; | ||
bottom: 0px; | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
packages/js/product-editor/src/icons/hidden-with-help-icon.tsx
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,27 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import { createElement } from '@wordpress/element'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import HelpIcon from './help-icon'; | ||
import HiddenIcon from './hidden-icon'; | ||
|
||
export default function HiddenWithHelpIcon( { | ||
width = 24, | ||
height = 24, | ||
...props | ||
}: React.HTMLProps< HTMLDivElement > ) { | ||
return ( | ||
<div className="woocommerce-hidden-with-help-icon" { ...props }> | ||
<HiddenIcon | ||
className="woocommerce-hidden-with-help-icon__hidden-icon" | ||
width={ width } | ||
height={ height } | ||
/> | ||
<HelpIcon className="woocommerce-hidden-with-help-icon__help-icon" /> | ||
</div> | ||
); | ||
} |