@pdg/react-form 1.0.100 → 1.0.101
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { ButtonProps } from '@mui/material';
|
|
2
2
|
import { PartialPick } from '../../@types';
|
|
3
3
|
import { FormContextValue } from '../../FormContext';
|
|
4
|
+
import { PdgIconProps } from '@pdg/react-component';
|
|
4
5
|
export interface FormButtonProps extends PartialPick<FormContextValue, 'color' | 'size'>, Omit<ButtonProps, 'color' | 'size' | 'startIcon' | 'endIcon'> {
|
|
5
6
|
type?: 'button' | 'submit';
|
|
6
|
-
icon?:
|
|
7
|
-
startIcon?:
|
|
8
|
-
endIcon?:
|
|
7
|
+
icon?: PdgIconProps['children'];
|
|
8
|
+
startIcon?: PdgIconProps['children'];
|
|
9
|
+
endIcon?: PdgIconProps['children'];
|
|
9
10
|
}
|
|
10
11
|
export declare const FormButtonDefaultProps: FormButtonProps;
|
package/dist/index.esm.js
CHANGED
|
@@ -590,9 +590,9 @@ Form.defaultProps = FormDefaultProps;var FormButtonDefaultProps = {
|
|
|
590
590
|
* ******************************************************************************************************************/
|
|
591
591
|
return (React.createElement(Button, __assign({ ref: ref, className: classNames(className, 'FormButton'), type: type, variant: variant, size: size, color: color, fullWidth: fullWidth, onClick: onClick }, props),
|
|
592
592
|
React.createElement(Box, { display: 'inline-flex', flexDirection: 'row', alignItems: 'center' },
|
|
593
|
-
(icon || startIcon) && (React.createElement(PdgIcon, { fontSize: size, color: 'inherit', sx: { mr: children ? 0.5 : undefined } }, icon || startIcon)),
|
|
593
|
+
(icon || startIcon) && (React.createElement(PdgIcon, { className: 'FormButton-StartIcon', fontSize: size, color: 'inherit', sx: { mr: children ? 0.5 : undefined } }, icon || startIcon)),
|
|
594
594
|
children,
|
|
595
|
-
endIcon && (React.createElement(PdgIcon, { fontSize: size, color: 'inherit', sx: { ml: children ? 0.5 : undefined } }, endIcon)))));
|
|
595
|
+
endIcon && (React.createElement(PdgIcon, { className: 'FormButton-EndIcon', fontSize: size, color: 'inherit', sx: { ml: children ? 0.5 : undefined } }, endIcon)))));
|
|
596
596
|
});
|
|
597
597
|
FormButton.displayName = 'FormButton';
|
|
598
598
|
FormButton.defaultProps = FormButtonDefaultProps;var FormLabelDefaultProps = {};var IconPdgIcon = styled(PdgIcon)(templateObject_1$g || (templateObject_1$g = __makeTemplateObject(["\n vertical-align: middle;\n margin-right: 3px;\n margin-top: -4px;\n margin-bottom: -2px;\n"], ["\n vertical-align: middle;\n margin-right: 3px;\n margin-top: -4px;\n margin-bottom: -2px;\n"])));
|
package/dist/index.js
CHANGED
|
@@ -590,9 +590,9 @@ Form.defaultProps = FormDefaultProps;var FormButtonDefaultProps = {
|
|
|
590
590
|
* ******************************************************************************************************************/
|
|
591
591
|
return (React.createElement(material.Button, __assign({ ref: ref, className: classNames(className, 'FormButton'), type: type, variant: variant, size: size, color: color, fullWidth: fullWidth, onClick: onClick }, props),
|
|
592
592
|
React.createElement(material.Box, { display: 'inline-flex', flexDirection: 'row', alignItems: 'center' },
|
|
593
|
-
(icon || startIcon) && (React.createElement(reactComponent.PdgIcon, { fontSize: size, color: 'inherit', sx: { mr: children ? 0.5 : undefined } }, icon || startIcon)),
|
|
593
|
+
(icon || startIcon) && (React.createElement(reactComponent.PdgIcon, { className: 'FormButton-StartIcon', fontSize: size, color: 'inherit', sx: { mr: children ? 0.5 : undefined } }, icon || startIcon)),
|
|
594
594
|
children,
|
|
595
|
-
endIcon && (React.createElement(reactComponent.PdgIcon, { fontSize: size, color: 'inherit', sx: { ml: children ? 0.5 : undefined } }, endIcon)))));
|
|
595
|
+
endIcon && (React.createElement(reactComponent.PdgIcon, { className: 'FormButton-EndIcon', fontSize: size, color: 'inherit', sx: { ml: children ? 0.5 : undefined } }, endIcon)))));
|
|
596
596
|
});
|
|
597
597
|
FormButton.displayName = 'FormButton';
|
|
598
598
|
FormButton.defaultProps = FormButtonDefaultProps;var FormLabelDefaultProps = {};var IconPdgIcon = material.styled(reactComponent.PdgIcon)(templateObject_1$g || (templateObject_1$g = __makeTemplateObject(["\n vertical-align: middle;\n margin-right: 3px;\n margin-top: -4px;\n margin-bottom: -2px;\n"], ["\n vertical-align: middle;\n margin-right: 3px;\n margin-top: -4px;\n margin-bottom: -2px;\n"])));
|