feat(base/ui): fixed native button active style (#12353)

* feat(base/ui): fixed native button active style
This commit is contained in:
Calinteodor 2022-10-11 11:26:09 +03:00 committed by GitHub
parent 6423ed8fb5
commit abdc5123eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -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 }

View File

@ -23,6 +23,10 @@ export default {
...buttonLabel ...buttonLabel
}, },
buttonContent: {
height: BUTTON_HEIGHT
},
buttonLabelDisabled: { buttonLabelDisabled: {
...buttonLabel, ...buttonLabel,
color: BaseTheme.palette.text03 color: BaseTheme.palette.text03