From e5ced0da0b1bd9b2e97faf94559c79f74899b09e Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Mon, 18 Feb 2019 21:23:03 +0800 Subject: [PATCH] Fix tab highlighting in a11y --- addons/a11y/src/components/Tabs.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/addons/a11y/src/components/Tabs.js b/addons/a11y/src/components/Tabs.js index 4edd9e5cb1f..6dbc8fbbf26 100644 --- a/addons/a11y/src/components/Tabs.js +++ b/addons/a11y/src/components/Tabs.js @@ -17,13 +17,6 @@ const List = styled.div(({ theme }) => ({ })); const Item = styled.button( - ({ active, theme }) => - active - ? { - opacity: 1, - borderBottom: `3px solid ${theme.color.secondary}`, - } - : {}, ({ theme }) => ({ textDecoration: 'none', padding: '10px 15px', @@ -41,7 +34,14 @@ const Item = styled.button( outline: '0 none', borderBottom: `3px solid ${theme.color.secondary}`, }, - }) + }), + ({ active, theme }) => + active + ? { + opacity: 1, + borderBottom: `3px solid ${theme.color.secondary}`, + } + : {} ); class Tabs extends Component {