mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-01 14:38:50 +00:00
add ResourceLinks component
This commit is contained in:
1 parent
251551b682
commit
027aa6d858
1 file changed
+31
@@ -0,0 +1,31 @@
|
||||
import React from 'react';
|
||||
import IconButton from './IconButton';
|
||||
import { BsGithub, BsBookHalf } from 'react-icons/bs';
|
||||
|
||||
interface Props {
|
||||
icon: React.ReactNode;
|
||||
children: React.ReactNode;
|
||||
repo: string;
|
||||
docs?: string;
|
||||
}
|
||||
|
||||
const ResourceLinks: React.FC<Props> = (props) => {
|
||||
return (
|
||||
<div style={{ display: 'flex' }}>
|
||||
<a href={props.repo} style={{ marginRight: '0.6rem' }}>
|
||||
<IconButton side="left" icon={<BsGithub />}>
|
||||
GitHub
|
||||
</IconButton>
|
||||
</a>
|
||||
{props.docs && (
|
||||
<a href={props.docs}>
|
||||
<IconButton side="left" icon={<BsBookHalf />}>
|
||||
Documentation
|
||||
</IconButton>
|
||||
</a>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default ResourceLinks;
|
||||
Reference in new issue
Block a user