-
Notifications
You must be signed in to change notification settings - Fork 2
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
refactor: split Checklist into sub-components and hooks #4088
Conversation
628dc66
to
79b9f86
Compare
Removed vultr server and associated DNS entries |
editor.planx.uk/src/@planx/components/Checklist/Public/components/ExclusiveChecklistItem.tsx
Outdated
Show resolved
Hide resolved
editor.planx.uk/src/@planx/components/Checklist/Public/Public.tsx
Outdated
Show resolved
Hide resolved
editor.planx.uk/src/@planx/components/Checklist/Public/components/ChecklistItems.tsx
Outdated
Show resolved
Hide resolved
editor.planx.uk/src/@planx/components/Checklist/Public/components/ChecklistItems.tsx
Outdated
Show resolved
Hide resolved
|
||
export const useExclusiveOption = ( | ||
exclusiveOptions: Option[], | ||
formik: FormikProps<{ checked: Array<string> }> |
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.
nit: Seeing this prop many times in this PR points towards useFormikContext()
being something worth considering. Not a blocker for sure.
A few nitpicks but no show stoppers - nice reorganisation, especially pulling logic out into clear and concise hooks 👍 |
In this PR:
GroupedChecklistOptions
,ExclusiveChecklistOption
andChecklistItems
from thePublic
checklist component to make the file easier to read.useExclusiveOption
to move the complexity out of the single dense file.