initial avatar and avatar layout components

This commit is contained in:
Foster Irwin 2022-11-09 15:02:49 -07:00
parent bd0d5a3f61
commit 639e0346b0
2 changed files with 66 additions and 0 deletions

View file

@ -0,0 +1,55 @@
import React from 'react';
export interface avatarProps {
imgUrl: string;
name?: string;
userName?: string;
description?: string;
}
export interface avatarLayoutProps {
list: list[];
}
export const Avatar = ({
imgUrl,
name,
userName,
description,
}: avatarProps): JSX.Element => {
return (
<div className="card m-4 border-2 border-secondary">
<div className="card__body">
<div className="avatar">
<img
className="avatar__photo avatar__photo--sm"
src={imgUrl}
/>
<div className="avatar__intro">
<div className="avatar__name">
{name}
</div>
<small class="avatar__subtitle">
{description}
</small>
</div>
</div>
</div>
</div>
)
}
export const AvatarLayout = ({
list
} :avatarLayoutProps): JSX.Element => {
return (
<div className="container">
<div className="flex flex-wrap justify-center bg-primary">
{list.map((e) => {
return <Avatar/>
})
}
</div>
</div>
)
}

View file

@ -2,6 +2,11 @@ import React from 'react';
import Layout from '@theme/Layout'; import Layout from '@theme/Layout';
import Link from '@docusaurus/Link'; import Link from '@docusaurus/Link';
import {
Avatar,
AvatarLayout
} from './_components/Avatar';
const Credits = (): JSX.Element => { const Credits = (): JSX.Element => {
const partnerLogos = [ const partnerLogos = [
{ {
@ -72,10 +77,12 @@ const Credits = (): JSX.Element => {
<h3> <h3>
Open Collective Donations Open Collective Donations
{/*Open Collective Donations*/} {/*Open Collective Donations*/}
<AvatarLayout list={[]}/>
</h3> </h3>
<h3> <h3>
GitHub Sponsor Donations GitHub Sponsor Donations
{/*GitHub Sponsor Donations*/} {/*GitHub Sponsor Donations*/}
<AvatarLayout list={[]}/>
</h3> </h3>
</div> </div>
<div className="container mx-auto p-6 leading-normal space-y-4"> <div className="container mx-auto p-6 leading-normal space-y-4">
@ -101,8 +108,12 @@ const Credits = (): JSX.Element => {
Literally thousands of hours have gone into creating, maintaining, and improving Meshtastic. Without our contributors none of this would be possible. Thank you for donating the time for each and every commit, issue, and pull request. Literally thousands of hours have gone into creating, maintaining, and improving Meshtastic. Without our contributors none of this would be possible. Thank you for donating the time for each and every commit, issue, and pull request.
</p> </p>
{/*GitHub Organization Contributors*/} {/*GitHub Organization Contributors*/}
<AvatarLayout list={[]}/>
</div> </div>
{/*Admin Bios*/} {/*Admin Bios*/}
<div className="container mx-auto p-6 leading-normal space-y-4">
<AvatarLayout list={[]}/>
</div>
</main> </main>
</Layout> </Layout>
) )