-
Notifications
You must be signed in to change notification settings - Fork 303
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[UPM-982]/evgeniy/redirect to error page while clicking contact us li…
…nk (#14944) * chore: [UPM-982]/evgeniy/redirect to error page while clicking contact us link * refactor: move css import, rename classname * chore: remove return * chore: trigger build
- Loading branch information
1 parent
b9c28e0
commit 6270454
Showing
5 changed files
with
38 additions
and
10 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
3 changes: 3 additions & 0 deletions
3
packages/components/src/components/open-livechat-link/index.ts
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,3 @@ | ||
import OpenLiveChatLink from './open-livechat-link'; | ||
|
||
export default OpenLiveChatLink; |
14 changes: 14 additions & 0 deletions
14
packages/components/src/components/open-livechat-link/open-livechat-link.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 @@ | ||
.open-livechat { | ||
&__link { | ||
background: transparent; | ||
border: none; | ||
margin: 0; | ||
padding: 0; | ||
color: var(--brand-red-coral); | ||
|
||
&:hover { | ||
text-decoration: underline; | ||
cursor: pointer; | ||
} | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
packages/components/src/components/open-livechat-link/open-livechat-link.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,18 @@ | ||
import React from 'react'; | ||
import { Localize } from '@deriv/translations'; | ||
import Text from '../text'; | ||
import './open-livechat-link.scss'; | ||
|
||
type TOpenLiveChatLink = { | ||
text_size?: React.ComponentProps<typeof Text>['size']; | ||
}; | ||
|
||
const OpenLiveChatLink = ({ children, text_size }: React.PropsWithChildren<TOpenLiveChatLink>) => ( | ||
<button type='button' className='open-livechat__link' onClick={() => window.LC_API.open_chat_window()}> | ||
<Text size={text_size || 'xs'} weight='bold' color='brand-red-coral'> | ||
{children || <Localize i18n_default_text='live chat' />} | ||
</Text> | ||
</button> | ||
); | ||
|
||
export default OpenLiveChatLink; |
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