-
-
Notifications
You must be signed in to change notification settings - Fork 765
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
Conversation
✅ Deploy Preview for asyncapi-website ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site settings. |
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-1137--asyncapi-website.netlify.app/ |
components/Profile.js
Outdated
|
||
export default function Profile() { | ||
const getContext = useContext(BlogContext); | ||
const profiles = getContext.post.profiles |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where are these profiles coming from?
why not have this component support props and you just provide data through props?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The profiles come from the post details...
title: "lorem ipsum"
profiles: "path/to/list/of/profiles
All you have to do in the md is to use the profile component
<Profile />
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not have this component support props and you just provide data through props?
If I Import the component in the markdown, how do i pass children in MD?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm just afraid passing data to component through metadata might not be super intuitive as we do it classical way always, like:
<YouTube id="Ni5tCY9r0TY" />
so component with props
look how next/previous works:
<DocsButton suggestions={[ { href:'/docs/concepts/consumer', type: 'back',
title: 'Consumer', }, { href:'/docs/concepts/message', type: 'next',
title: 'Message', } ]} />
so IMHO Profile
should work same way, you add component with array of profiles
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update @derberg. updated the PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@magicmatatjahu something from you? I do not want to approve before as you were called out first
@AceTheCreator can I get any preview of this component in terms of UI? I don't see any place where this component is used right now in the |
@akshatnema it's actually nothing serious 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM @AceTheCreator
/rtm |
Implemented a new markdown component for rendering a list of profiles
Related to #1131
cc @magicmatatjahu