-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: adds a new documentation button * chore: omits old docs button position * docs: imporves linting * docs: removes extra spaces * chore: improves code quality * docs: updates a function name * chore: further improves code quality
- Loading branch information
Showing
3 changed files
with
75 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,35 @@ | ||
import React from 'react'; | ||
|
||
import { faCircleQuestion } from '@fortawesome/free-solid-svg-icons'; | ||
import { | ||
FontAwesomeIcon | ||
} from '@fortawesome/react-fontawesome'; | ||
|
||
import SimpleButton, { SimpleButtonProps } from '@terrestris/react-geo/dist/Button/SimpleButton/SimpleButton'; | ||
|
||
export type DocumentationButtonProps = SimpleButtonProps; | ||
|
||
const defaultClassName = 'documentationbutton'; | ||
export const DocumentationButton: React.FC<DocumentationButtonProps> = ({ | ||
className | ||
}) => { | ||
|
||
const finalClassName = className | ||
? `${defaultClassName} ${className}` | ||
: defaultClassName; | ||
|
||
return ( | ||
<SimpleButton | ||
onClick={() => window.open('/gis-docs', '_blank')} | ||
className={finalClassName} | ||
icon={ | ||
<FontAwesomeIcon | ||
icon={faCircleQuestion} | ||
/> | ||
} | ||
> | ||
</SimpleButton> | ||
); | ||
}; | ||
|
||
export default DocumentationButton; |
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