Skip to content

Commit

Permalink
fix: tertiary button border opacity
Browse files Browse the repository at this point in the history
Tertiary button shifted page by 1 pixel onPress. Changing border opacity.
  • Loading branch information
joseio committed Feb 6, 2024
1 parent f82f0f9 commit a7af0c8
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/components/Button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,10 @@ export class Button extends React.Component<ButtonProps> {
}

private getStateStyle = (state: PressableStateCallbackType): StyleProp<ViewStyle> => {
const { kind } = this.props;
const keepBorder = ['high-contrast', 'high-contrast-inverse'].includes(kind as string);

return state.pressed
? {
backgroundColor: this.getBackgroundColor(true),
borderWidth: keepBorder ? 1 : 0,
borderColor: 'rgba(0, 0, 0, 0)',
}
: undefined;
};
Expand Down

0 comments on commit a7af0c8

Please sign in to comment.