From abdc5123eb3e2344650465a8342543e1b245c84b Mon Sep 17 00:00:00 2001 From: Calinteodor Date: Tue, 11 Oct 2022 11:26:09 +0300 Subject: [PATCH] feat(base/ui): fixed native button active style (#12353) * feat(base/ui): fixed native button active style --- react/features/base/ui/components/native/Button.tsx | 6 ++++++ react/features/base/ui/components/native/buttonStyles.ts | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/react/features/base/ui/components/native/Button.tsx b/react/features/base/ui/components/native/Button.tsx index 24aa4fc75..51b47a11c 100644 --- a/react/features/base/ui/components/native/Button.tsx +++ b/react/features/base/ui/components/native/Button.tsx @@ -15,6 +15,7 @@ import styles from './buttonStyles'; export interface IButtonProps extends ButtonProps { color?: string; + contentStyle?: Object | undefined; labelStyle?: Object | undefined; style?: Object | undefined; } @@ -22,6 +23,7 @@ export interface IButtonProps extends ButtonProps { const Button: React.FC = ({ accessibilityLabel, color: buttonColor, + contentStyle, disabled, icon, labelKey, @@ -88,6 +90,10 @@ const Button: React.FC = ({ accessibilityLabel = { t(accessibilityLabel ?? '') } children = { t(labelKey ?? '') } color = { color } + contentStyle = { [ + styles.buttonContent, + contentStyle + ] } disabled = { disabled } // @ts-ignore icon = { icon } diff --git a/react/features/base/ui/components/native/buttonStyles.ts b/react/features/base/ui/components/native/buttonStyles.ts index c06146c27..a1c789c77 100644 --- a/react/features/base/ui/components/native/buttonStyles.ts +++ b/react/features/base/ui/components/native/buttonStyles.ts @@ -23,6 +23,10 @@ export default { ...buttonLabel }, + buttonContent: { + height: BUTTON_HEIGHT + }, + buttonLabelDisabled: { ...buttonLabel, color: BaseTheme.palette.text03