-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Franck ALARY
committed
Feb 12, 2024
1 parent
95f2f9d
commit 911a3f7
Showing
6 changed files
with
39 additions
and
31 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import ButtonIconTextGeneric from './ButtonIconTextGeneric.js' | ||
|
||
function ButtonIconTextCloud(props) { | ||
return <ButtonIconTextGeneric {...props} icon={'\uf0ed'}/> | ||
} | ||
|
||
export default ButtonIconTextCloud |
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,26 @@ | ||
import React, { useCallback, useMemo } from 'react' | ||
|
||
const {ipcRenderer} = window.require('electron') | ||
|
||
function ButtonExternalLink ({href, children}) { | ||
const | ||
onClick = useCallback( | ||
(e) => { | ||
e.preventDefault() | ||
ipcRenderer.send('new-window', href) | ||
}, | ||
[href] | ||
), | ||
childHref = useMemo( | ||
() => React.Children.map( | ||
children, | ||
(child) => React.cloneElement(child, {onClick}) | ||
), | ||
[children, onClick] | ||
) | ||
|
||
return <>{childHref}</> | ||
|
||
} | ||
|
||
export default ButtonExternalLink |
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