-
Notifications
You must be signed in to change notification settings - Fork 0
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(#132): add name and passthru props #133
Conversation
WalkthroughThe recent updates to the Vue components involve enhancing form elements to inherit attributes dynamically with Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (6)
- src/components/Checkbox.vue (2 hunks)
- src/components/FormElement.vue (2 hunks)
- src/components/Radio.vue (2 hunks)
- src/components/Select.vue (2 hunks)
- src/components/Textarea.vue (2 hunks)
- src/components/Textfield.vue (2 hunks)
Additional comments: 16
src/components/Radio.vue (2)
11-15: The addition of
v-bind="$attrs"
and:name="name"
to the input element is a good practice for allowing arbitrary attributes to be passed to the component and binding thename
attribute to the input element. Ensure that thename
prop is being passed wherever this component is used.33-36: The
name
prop has been correctly added with a default value ofundefined
. This is a good practice as it allows the component to function without aname
if it's not provided. However, consider if a default value is necessary or if it should be required without a default.src/components/Textarea.vue (2)
4-10: The use of
v-bind="$attrs"
to pass all attributes to the textarea element is a good practice for Vue.js components, allowing for greater flexibility. The addition of the:name="name"
binding is also correct, enabling thename
attribute to be set on the textarea element.28-31: The
name
prop has been added with a type ofString
and a default value ofundefined
. This is consistent with the changes in other components and allows for optional usage of thename
attribute.src/components/Select.vue (2)
4-12: The addition of
v-bind="$attrs"
to the<select>
element is a good practice, allowing for arbitrary attributes to be passed to the select element. The:name="name"
binding is correctly added to enable thename
attribute on the select element.35-38: The
name
property has been added with a type ofString
and a default value ofundefined
. This is consistent with the changes in other components and allows for optional usage of thename
attribute.src/components/Textfield.vue (2)
4-12: The use of
v-bind="$attrs"
to pass all attributes to the input element is a good practice for Vue.js components, allowing for greater flexibility. The addition of the:name="name"
binding is also correct, enabling thename
attribute to be set on the input element.28-31: The
name
prop has been added with a type ofString
and a default value ofundefined
. This is consistent with the changes in other components and allows for optional usage of thename
attribute.src/components/Checkbox.vue (2)
12-15: The addition of
v-bind="$attrs"
to the input element is a good practice, allowing for arbitrary attributes to be passed to the checkbox component. The:name="name"
binding is correctly added to enable thename
attribute on the input element.50-53: The
name
prop has been added with a type ofString
and a default value ofundefined
. This is consistent with the changes in other components and allows for optional usage of thename
attribute.src/components/FormElement.vue (6)
24-24: The
v-bind
directive is used correctly to pass down theid
,name
,placeholder
,required
,type
, and other attributes to theCTTextfield
component. This is a good practice for reusability and flexibility of the component.31-31: The
v-bind
directive is used correctly to pass down theid
,name
,placeholder
,required
, and other attributes to theCTTextarea
component. This is a good practice for reusability and flexibility of the component.38-38: The
v-bind
directive is used correctly to pass down theerror
,id
,name
,options
,placeholder
,required
, and other attributes to theCTSelect
component. This is a good practice for reusability and flexibility of the component.45-45: The
v-bind
directive is used correctly to pass down theid
,name
,placeholder
,required
, and other attributes to theCTRadio
component. This is a good practice for reusability and flexibility of the component.52-52: The
v-bind
directive is used correctly to pass down theid
,label
,name
,placeholder
,required
, and other attributes to theCTCheckbox
component. This is a good practice for reusability and flexibility of the component.102-105: The
name
prop has been added with a type ofString
and a default value ofundefined
. This is consistent with the changes in other components and allows for optional usage of thename
attribute. Ensure that thename
prop is being passed wherever this component is used.
Types of changes
Description
Adds
name
and passthru props to CTFormElements and relevant components.Checklist:
Screenshots/Media:
Summary by CodeRabbit