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
Update the incompatible gateways notice design #8365
Merged
tarhi-saad
merged 5 commits into
trunk
from
update/8238-incompatible-gateways-notice-design
Feb 7, 2023
Merged
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
50850d1
Fix the alert icon's name
tarhi-saad f42085f
Add "status" to the Alert's API
tarhi-saad 6159ce4
Update the incompatible gateways notice's design
tarhi-saad 6d4476d
Set the list's bullet points from CSS
tarhi-saad ee2c22e
Merge branch 'trunk' into update/8238-incompatible-gateways-notice-de…
tarhi-saad File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,36 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import { IconProps } from '@wordpress/icons/build-types/icon'; | ||
import { SVG } from '@wordpress/primitives'; | ||
|
||
const cart = ( | ||
<SVG xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"> | ||
interface AlertProps { | ||
status?: 'warning' | 'error' | 'success' | 'info'; | ||
props?: IconProps; | ||
} | ||
|
||
const statusToColorMap = { | ||
warning: '#F0B849', | ||
error: '#CC1818', | ||
success: '#46B450', | ||
info: '#0073AA', | ||
}; | ||
|
||
const Alert = ( { status = 'warning', ...props }: AlertProps ) => ( | ||
<SVG | ||
xmlns="http://www.w3.org/2000/svg" | ||
fill="none" | ||
viewBox="0 0 24 24" | ||
{ ...props } | ||
> | ||
<path | ||
d="M12 20C16.4183 20 20 16.4183 20 12C20 7.58172 16.4183 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20Z" | ||
stroke="#CC1818" | ||
stroke={ statusToColorMap[ status ] } | ||
strokeWidth="1.5" | ||
/> | ||
<path d="M13 7H11V13H13V7Z" fill="#CC1818" /> | ||
<path d="M13 15H11V17H13V15Z" fill="#CC1818" /> | ||
<path d="M13 7H11V13H13V7Z" fill={ statusToColorMap[ status ] } /> | ||
<path d="M13 15H11V17H13V15Z" fill={ statusToColorMap[ status ] } /> | ||
</SVG> | ||
); | ||
|
||
export default cart; | ||
export default Alert; |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we use list styling instead of a dot? don't feel like you need to change this, just asking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By changing the display from the default
display: list-item
toflex
, some properties of lists are lost (e.g.,list-style-type
). But, we can use thebefore
CSS property instead! 🙌 I pushed the changes