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.
Update the incompatible gateways notice design (#8365)
* Fix the alert icon's name * Add "status" to the Alert's API * Update the incompatible gateways notice's design * Set the list's bullet points from CSS
- Loading branch information
1 parent
83da1a5
commit 7fb73cc
Showing
4 changed files
with
35 additions
and
9 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,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; |