feat(base/ui): fixed native button active style (#12353)
* feat(base/ui): fixed native button active style
This commit is contained in:
parent
6423ed8fb5
commit
abdc5123eb
|
@ -15,6 +15,7 @@ import styles from './buttonStyles';
|
||||||
|
|
||||||
export interface IButtonProps extends ButtonProps {
|
export interface IButtonProps extends ButtonProps {
|
||||||
color?: string;
|
color?: string;
|
||||||
|
contentStyle?: Object | undefined;
|
||||||
labelStyle?: Object | undefined;
|
labelStyle?: Object | undefined;
|
||||||
style?: Object | undefined;
|
style?: Object | undefined;
|
||||||
}
|
}
|
||||||
|
@ -22,6 +23,7 @@ export interface IButtonProps extends ButtonProps {
|
||||||
const Button: React.FC<IButtonProps> = ({
|
const Button: React.FC<IButtonProps> = ({
|
||||||
accessibilityLabel,
|
accessibilityLabel,
|
||||||
color: buttonColor,
|
color: buttonColor,
|
||||||
|
contentStyle,
|
||||||
disabled,
|
disabled,
|
||||||
icon,
|
icon,
|
||||||
labelKey,
|
labelKey,
|
||||||
|
@ -88,6 +90,10 @@ const Button: React.FC<IButtonProps> = ({
|
||||||
accessibilityLabel = { t(accessibilityLabel ?? '') }
|
accessibilityLabel = { t(accessibilityLabel ?? '') }
|
||||||
children = { t(labelKey ?? '') }
|
children = { t(labelKey ?? '') }
|
||||||
color = { color }
|
color = { color }
|
||||||
|
contentStyle = { [
|
||||||
|
styles.buttonContent,
|
||||||
|
contentStyle
|
||||||
|
] }
|
||||||
disabled = { disabled }
|
disabled = { disabled }
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
icon = { icon }
|
icon = { icon }
|
||||||
|
|
|
@ -23,6 +23,10 @@ export default {
|
||||||
...buttonLabel
|
...buttonLabel
|
||||||
},
|
},
|
||||||
|
|
||||||
|
buttonContent: {
|
||||||
|
height: BUTTON_HEIGHT
|
||||||
|
},
|
||||||
|
|
||||||
buttonLabelDisabled: {
|
buttonLabelDisabled: {
|
||||||
...buttonLabel,
|
...buttonLabel,
|
||||||
color: BaseTheme.palette.text03
|
color: BaseTheme.palette.text03
|
||||||
|
|
Loading…
Reference in New Issue