Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added new md component #1137

Merged
merged 9 commits into from
Dec 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion components/MDX.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import Caption from '../components/Caption'
import Row from '../components/layout/Row'
import Column from '../components/layout/Column'
import Figure from '../components/Figure'
import Profile from '../components/Profile'
import GeneratorInstallation from '../components/GeneratorInstallation'
import NewsletterSubscribe from '../components/NewsletterSubscribe'
import DocsButton from '../components/buttons/DocsButton';
Expand Down Expand Up @@ -88,7 +89,8 @@ function getMDXComponents() {
TwitterMomentShare,
TwitterDMButton,
TwitterVideoEmbed,
TwitterOnAirButton
TwitterOnAirButton,
Profile
}
}

Expand Down
23 changes: 23 additions & 0 deletions components/Profile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
export default function Profile({profiles = [], className}) {
if(profiles.length === 0){
return null;
}
return (
<div className="p-4 grid grid-cols-2 sm:grid-cols-4 gap-5 border border-slate-100 mt-4 rounded drop-shadow-md">
{profiles.map((profile) => (
<a
href={profile.link}
key={profile.name}
target="_blank"
className="flex flex-col items-center"
rel="noreferrer"
>
<img src={profile.avatar} alt={profile.name} className="rounded" />
<span className="mt-2 text-sm underline decoration-secondary-300">
{profile.name}
</span>
</a>
))}
</div>
);
}