-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DUOS-2897] Remove more hyperscript helpers (#2438)
- Loading branch information
Showing
38 changed files
with
1,014 additions
and
1,019 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 |
---|---|---|
@@ -1,26 +1,11 @@ | ||
import { Component } from 'react'; | ||
import { div, hh, h4, span } from 'react-hyperscript-helpers'; | ||
import React from 'react'; | ||
import './Alert.css'; | ||
|
||
export const Alert = hh(class Alert extends Component { | ||
|
||
render() { | ||
|
||
return div({ | ||
id: this.props.id + '_alert', | ||
className: 'alert-wrapper ' + (this.props.type) | ||
}, [ | ||
h4({ | ||
id: this.props.id + '_title', | ||
className: 'alert-title', | ||
isRendered: this.props.title !== undefined | ||
}, [this.props.title]), | ||
span({ | ||
id: this.props.id + '_description', | ||
className: 'alert-description', | ||
isRendered: this.props.description !== undefined | ||
}, [this.props.description]), | ||
]); | ||
} | ||
|
||
}); | ||
export const Alert = ({ id, type, title, description }) => { | ||
return ( | ||
<div id={`${id}_alert`} className={`alert-wrapper ${type}`}> | ||
{title && <h4 id={`${id}_title`} className="alert-title">{title}</h4>} | ||
{description && <span id={`${id}_description`} className="alert-description">{description}</span>} | ||
</div> | ||
); | ||
}; |
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,12 +1,10 @@ | ||
import { button, span } from 'react-hyperscript-helpers'; | ||
import React from 'react'; | ||
|
||
export default function CloseIconComponent(props) { | ||
const { closeFn } = props; | ||
return button({ | ||
type: 'button', | ||
className: 'modal-close-btn close', | ||
onClick: closeFn | ||
}, [ | ||
span({ className: 'glyphicon glyphicon-remove default-color'}) | ||
]); | ||
} | ||
return ( | ||
<button type="button" className="modal-close-btn close" onClick={closeFn}> | ||
<span className="glyphicon glyphicon-remove default-color" /> | ||
</button> | ||
); | ||
} |
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,15 +1,18 @@ | ||
import React from 'react'; | ||
import LibraryCardAgreementLink from '../assets/Library_Card_Agreement_2023_ApplicationVersion.pdf'; | ||
import DownloadIcon from 'react-material-icon-svg/dist/Download'; | ||
import {a, div} from 'react-hyperscript-helpers'; | ||
import React from 'react'; | ||
|
||
const downloadIcon = <DownloadIcon fill={'black'} style={{verticalAlign: 'middle', height: '24px'}}/>; | ||
export const LibraryCardAgreementTermsDownload = | ||
div({}, [ | ||
'I agree to the terms of the Library Card Agreement', | ||
a({ | ||
id: 'link_downloadAgreement', | ||
href: LibraryCardAgreementLink, | ||
target: '_blank', | ||
style: {marginLeft: '.5rem'} | ||
}, [downloadIcon])]); | ||
export const LibraryCardAgreementTermsDownload = () => ( | ||
<div> | ||
I agree to the terms of the Library Card Agreement | ||
<a | ||
id="link_downloadAgreement" | ||
href={LibraryCardAgreementLink} | ||
target="_blank" | ||
rel="noreferrer" | ||
style={{marginLeft: '.5rem'}} | ||
> | ||
<DownloadIcon fill={'black'} style={{verticalAlign: 'middle', height: '24px'}}/> | ||
</a> | ||
</div> | ||
); |
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
Oops, something went wrong.