Skip to content

Commit

Permalink
fix(button): fix focus outline margin issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Artur Bien committed Dec 12, 2020
1 parent 8f63d9c commit 7405c5b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ type BorderProps = {
active?: boolean;
};

// TODO: pass theme as an argument instead of using context ?
const Borders = ({
isPressed = false,
variant = 'default',
Expand Down Expand Up @@ -156,7 +157,7 @@ const Borders = ({
<View style={[borderStyles.position, ...inner]}>
{focus && !active && (
<View
style={[borderStyles.position, { margin: 2 }, ...focus]}
style={[borderStyles.position, { margin: primary ? 0 : 2 }, ...focus]}
/>
)}
{active && (
Expand Down

0 comments on commit 7405c5b

Please sign in to comment.