feat(button): add native type#640
Merged
lukasmatta merged 8 commits intoMay 29, 2026
Merged
Conversation
Coverage report for library
Test suite run success1072 tests passing in 33 suites. Report generated by 🧪jest coverage report action from 7e470d8 |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new nativeType input to CpsButtonComponent so consumers can configure the rendered HTML <button type="..."> (button|submit|reset), with a default of button, and documents/tests the behavior.
Changes:
- Added
nativeType: 'button' | 'submit' | 'reset'input toCpsButtonComponent(default:'button'). - Updated the button template to bind the native
typeattribute tonativeType. - Updated component API JSON and unit tests to cover the new input and ensure it doesn’t affect styling
type.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| projects/cps-ui-kit/src/lib/components/cps-button/cps-button.component.ts | Introduces the nativeType input with a default value. |
| projects/cps-ui-kit/src/lib/components/cps-button/cps-button.component.html | Binds the rendered <button> type attribute to nativeType. |
| projects/cps-ui-kit/src/lib/components/cps-button/cps-button.component.spec.ts | Adds assertions/tests for default and configured nativeType values. |
| projects/composition/src/app/api-data/cps-button.json | Documents nativeType in the generated component API data. |
Playwright test resultsDetails
|
…igurable-type-prop
…igurable-type-prop
fateeand
approved these changes
May 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds support for configuring the native HTML
typeattribute of theCpsButtonComponent, allowing it to be set to'button','submit', or'reset'. The default value is'button'. The changes ensure that the new input is documented, properly reflected in the rendered HTML, and thoroughly tested.Component API and Implementation:
@Input() nativeTypeproperty toCpsButtonComponent, defaulting to'button', which controls the native HTMLtypeattribute of the button (projects/cps-ui-kit/src/lib/components/cps-button/cps-button.component.ts).typeattribute to the newnativeTypeinput (projects/cps-ui-kit/src/lib/components/cps-button/cps-button.component.html).nativeTypeproperty in the component's JSON API data (projects/composition/src/app/api-data/cps-button.json).Testing:
nativeType, its effect on the rendered button, and its independence from the stylingtypeproperty (projects/cps-ui-kit/src/lib/components/cps-button/cps-button.component.spec.ts). [1] [2]Release notes: