-
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.
BugFix: Issue#9 download button not working (#16)
* Upstream merge for WIP bug branch (#15) * Documentation Fix: Create the bare minimums (#12) * Created the readme file * Update issue templates Added the default GH templates for bug reports and features * Added PR templates * Workaround for GH problem: wont pick multiple PR templates * Removing workaround to test alternate GH does not seem to pickup multiple PR templates. This file was added temporarily to validate this issue (indeed it doesn't and by default only picks up `.github/pull_request_template.md`). Looks like the only way to get multiple templates working is by using URL query parameters as discussed (here)[https://help.github.com/en/github/managing-your-work-on-github/about-automation-for-issues-and-pull-requests-with-query-parameters] * Updated PR templates to remove front matter headings * Publishing readme content * Fixed minor markdown defects * Minor content edits * Fixes done (#14) * Added new Link comp and associated changes
- Loading branch information
1 parent
672c1c5
commit a521dc1
Showing
4 changed files
with
95 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import React from "react"; | ||
import styled from "styled-components"; | ||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; | ||
|
||
const Container = styled.a` | ||
display: flex; | ||
align-items: center; | ||
flex-direction: row; | ||
padding: 0.4rem; | ||
margin: 0.4rem; | ||
border-radius: 5px; | ||
text-decoration: none; | ||
border: 2px solid palevioletred; | ||
background: white; | ||
color: palevioletred; | ||
&:hover { | ||
background: palevioletred; | ||
border: 2px solid palevioletred; | ||
color: white; | ||
} | ||
`; | ||
|
||
const DisabledContainer = styled.div` | ||
display: flex; | ||
align-items: center; | ||
flex-direction: row; | ||
padding: 0.4rem; | ||
margin: 0.4rem; | ||
border-radius: 5px; | ||
text-decoration: none; | ||
border: 2px solid gray; | ||
background: lightgray; | ||
color: gray; | ||
`; | ||
|
||
const Label = styled.span` | ||
margin: 0 0.4rem 0 0.8rem; | ||
line-height: 1.2; | ||
&::before { | ||
margin: 0 10px; | ||
} | ||
`; | ||
|
||
const FaIconLink = props => { | ||
const { faIcon, label, isDisabled, href, download } = props; | ||
|
||
if(isDisabled){ | ||
return ( | ||
<DisabledContainer> | ||
<FontAwesomeIcon icon={faIcon} /> | ||
<Label>{label}</Label> | ||
</DisabledContainer> | ||
); | ||
} | ||
else{ | ||
return ( | ||
<Container href={href} download={download}> | ||
<FontAwesomeIcon icon={faIcon} /> | ||
<Label>{label}</Label> | ||
</Container> | ||
); | ||
} | ||
|
||
}; | ||
|
||
export default FaIconLink; |
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,5 +1,6 @@ | ||
export { default as CustomConsole } from './CustomConsole'; | ||
export { default as Recorder } from './Recorder'; | ||
export { default as FaIconButton } from './Buttons/FaIconButton'; | ||
export { default as ToggleButton } from './Buttons/ToggleButton'; | ||
export { default as RecorderControls } from './Recorder/RecorderControls'; | ||
export { default as CustomConsole } from "./CustomConsole"; | ||
export { default as Recorder } from "./Recorder"; | ||
export { default as FaIconButton } from "./Buttons/FaIconButton"; | ||
export { default as ToggleButton } from "./Buttons/ToggleButton"; | ||
export { default as RecorderControls } from "./Recorder/RecorderControls"; | ||
export { default as FaIconLink } from "./Buttons/FaIconLink"; |