-
Notifications
You must be signed in to change notification settings - Fork 10
border radius for button and textinput components #345
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -234,7 +234,7 @@ const TextInput = (props) => { | |
| } ${props.populators?.customIcon ? "withIcon" : ""}`; | ||
|
|
||
| const datePickerRef = useRef(null); | ||
|
|
||
| const borderRadius = props.borderRadius; | ||
| return ( | ||
| <React.Fragment> | ||
| <div | ||
|
|
@@ -284,6 +284,7 @@ const TextInput = (props) => { | |
| ? new Date(props?.populators?.max) | ||
| : undefined | ||
| } | ||
| style={props.style ? { borderRadius, ...props.style } : borderRadius ? { borderRadius } : undefined} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix style precedence: borderRadius prop should override style.borderRadius. The current spread order allows Apply this pattern instead: -style={props.style ? { borderRadius, ...props.style } : borderRadius ? { borderRadius } : undefined}
+style={borderRadius ? { ...props.style, borderRadius } : props.style}This ensures:
Apply this change to all three occurrences (lines 287, 347, 431). Also applies to: 347-347, 431-431 🤖 Prompt for AI Agents
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @akhil-egov You can simply achieve the same result using: |
||
| /> | ||
| <div | ||
| className={`digit-new-date-format ${ | ||
|
|
@@ -343,7 +344,7 @@ const TextInput = (props) => { | |
| }} | ||
| ref={props.inputRef} | ||
| value={props?.value} | ||
| style={{ ...props.style }} | ||
| style={props.style ? { borderRadius, ...props.style } : borderRadius ? { borderRadius } : undefined} | ||
| defaultValue={props.defaultValue} | ||
| minLength={props.minlength} | ||
| maxLength={props.maxlength} | ||
|
|
@@ -427,7 +428,7 @@ const TextInput = (props) => { | |
| }} | ||
| ref={props.inputRef} | ||
| value={props?.value} | ||
| style={{ ...props.style }} | ||
| style={props.style ? { borderRadius, ...props.style } : borderRadius ? { borderRadius } : undefined} | ||
| defaultValue={props.defaultValue} | ||
| minLength={props.minlength} | ||
| maxLength={props.maxlength} | ||
|
|
@@ -526,6 +527,7 @@ TextInput.propTypes = { | |
| errors: PropTypes.object, | ||
| config: PropTypes.object, | ||
| error: PropTypes.string, | ||
| borderRadius: PropTypes.string | ||
| }; | ||
|
|
||
| TextInput.defaultProps = { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.