-
Notifications
You must be signed in to change notification settings - Fork 10
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
Render children for QuestionBox #224
Comments
What about the continue button? I see that we will keep adding components within the QuestionBox as his project evolves I think it would be more extensible to have QuestionBox render children within it. We did this with the point.jsx And questionBox is stating to look a lot like a point, with a different format. Should we have QuestionBox render children, where status badges, and maybe the continue button are children. Should we look at Point and have a different vState or pass a prop or something to it to make it take on the QuestionBox appearance? |
Yup, I see view status and view summary in the other issues, and I think children is the right answer. |
@justin-b-yee I added reference to app/components/point.jsx and now I'm moving this to todo. |
Interested to continue work on it. |
Step 1: Refactor QuestionBox import React from 'react'; const QuestionBox = ({ children = [], className = '', ...otherProps }) => { return ( Your Question Here{/* Render any additional content here */} {children} ); }; const useStyles = createUseStyles({ export default QuestionBox; ============================================================== //Updating References // app/stories/QuestionBox.stories.jsx import React from 'react'; export default { export const WithStatusBadge = () => ( export const WithCompleteBadgeAndContinueButton = () => ( export const WithSummaryAndActivityButtons = () => ( View Summary View My Activity ); |
@gaikwadsanjeevv did you move this into Ready for Review? I can't find a PR for it. See this for how to create a pr. https://github.com/EnCiv/.github/wiki/Contributing |
I'm moving it back to in progress, but please move it to ready to review again when ready. |
Yes sir, i have moved again to Ready to review
…On Mon, Nov 25, 2024 at 12:41 PM David ***@***.***> wrote:
I'm moving it back to in progress, but please move it to ready to review
again when ready.
—
Reply to this email directly, view it on GitHub
<#224 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BGQI5KH2XMQE4OKLFCUBNQL2CODOVAVCNFSM6AAAAABPQMEWFKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOJYHE4DSOBZGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Specs
Refactor app/components/question-box.jsx so that it renders children, rather than just rendering a status badge with the number of participants. Where QuestionBox is used in the code, the code should be modified to pass 1 child that is a StatusBadge
Tasks
See app/components/point.jsx for an example of rendering children this way.
Figma
The text was updated successfully, but these errors were encountered: