-
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.
rework: update Alert component to use ZendeskAlert directly with succ…
…ess custom bg
- Loading branch information
Showing
5 changed files
with
15 additions
and
29 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,27 +1,11 @@ | ||
import { Alert as ZendeskAlert, Title as ZendeskTitle, Close as ZendeskClose } from '@zendeskgarden/react-notifications'; | ||
import styled from 'styled-components'; | ||
import { AlertArgs } from './_types'; | ||
import { IAlertProps } from '@zendeskgarden/react-notifications'; | ||
|
||
const UgAlert = styled(ZendeskAlert)` | ||
background-color: white; | ||
color: ${({ theme }) => theme.palette.grey[700]}; | ||
border-width: 2px; | ||
font-size: ${({ theme }) => theme.fontSizes.sm}; | ||
`; | ||
|
||
const UgAlertTitle = styled(ZendeskTitle)` | ||
font-size: ${({ theme }) => theme.fontSizes.md}; | ||
`; | ||
export interface AlertArgs extends IAlertProps {} | ||
|
||
/** | ||
* Breadcrumbs mark and communicate a user’s location in the product. | ||
* <hr> | ||
* Used for this: | ||
- To show the user where they are in a nested navigation | ||
- To provide a quick way to navigate to ancestor pages | ||
*/ | ||
const Alert = (props: AlertArgs) => <UgAlert {...props}/>; | ||
Alert.Title = UgAlertTitle; | ||
const Alert = (props: AlertArgs) => <ZendeskAlert {...props}/>; | ||
Alert.Title = ZendeskTitle; | ||
Alert.Close = ZendeskClose; | ||
|
||
export { Alert }; |
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