-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #689 from unitaryfund/650_subscriptions
Member subscriptions
- Loading branch information
Showing
9 changed files
with
132 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { library } from '@fortawesome/fontawesome-svg-core' | ||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' | ||
import { faBell, faBellSlash } from '@fortawesome/free-solid-svg-icons' | ||
import { Button } from 'react-bootstrap' | ||
import TooltipTrigger from './TooltipTrigger' | ||
|
||
library.add(faBell, faBellSlash) | ||
|
||
const SubscribeButton = (props) => | ||
<span> | ||
{!props.isSubscribed && | ||
<TooltipTrigger message={'Subscribe to ' + props.typeLabel}> | ||
<Button className='submission-button' variant='secondary' aria-label={'Subscribe to ' + props.typeLabel} onClick={props.onSubscribe}><FontAwesomeIcon icon='bell' /></Button> | ||
</TooltipTrigger>} | ||
{props.isSubscribed && | ||
<TooltipTrigger message={'Unsubscribe from ' + props.typeLabel}> | ||
<Button className='submission-button' variant='primary' aria-label={'Unsubscribe from ' + props.typeLabel} onClick={props.onSubscribe}><FontAwesomeIcon icon='bell-slash' /></Button> | ||
</TooltipTrigger>} | ||
</span> | ||
|
||
export default SubscribeButton |
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
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