-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add variants to InputControl prefix/suffix wrappers #64824
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 |
---|---|---|
|
@@ -209,16 +209,31 @@ export interface InputControlLabelProps { | |
size?: BaseProps[ 'size' ]; | ||
} | ||
|
||
export type InputControlPrefixWrapperProps = { | ||
export type PrefixSuffixWrapperProps = { | ||
/** | ||
* The prefix to be inserted. | ||
* The content to be inserted. | ||
*/ | ||
children: ReactNode; | ||
}; | ||
|
||
export type InputControlSuffixWrapperProps = { | ||
/** | ||
* The suffix to be inserted. | ||
* Internal prop used to control the padding size of the wrapper. | ||
* | ||
* @ignore | ||
*/ | ||
children: ReactNode; | ||
size?: BaseProps[ 'size' ]; | ||
/** | ||
* Internal prop used to control the padding size of the wrapper. | ||
* | ||
* @ignore | ||
*/ | ||
__next40pxDefaultSize?: BaseProps[ '__next40pxDefaultSize' ]; | ||
Comment on lines
+218
to
+228
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. Is 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. Yes. Also in this case I do consider these props to be pretty much part of the API, just set through context by |
||
/** | ||
* Adjust the wrapper based on the prefix or suffix content. | ||
* | ||
* - `'default'`: Standard padding for text content. | ||
* - `'icon'`: For icons. | ||
* - `'control'`: For controls, like buttons or selects. | ||
* | ||
* @default 'default' | ||
*/ | ||
variant?: 'default' | 'icon' | 'control'; | ||
}; |
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.
Moving all the style logic into the styles file.