Skip to content

Commit

Permalink
fix: Actions tab button alignment 🐛
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunsaker committed May 21, 2024
1 parent 1991148 commit 9843d31
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 13 deletions.
31 changes: 18 additions & 13 deletions src/components/tabBar/TabBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,33 @@ export const TabBar = (): ReactElement => {

return (
<Container>
{TABS.map(tab => (
<Tab
key={tab.id}
kind="secondary"
active={activeTab === tab.id}
onClick={() => setActiveTab(tab.id)}
>
{tab.label}
</Tab>
))}
<ContentContainer>
{TABS.map(tab => (
<Tab
key={tab.id}
kind="secondary"
active={activeTab === tab.id}
onClick={() => setActiveTab(tab.id)}
>
{tab.label}
</Tab>
))}
</ContentContainer>
</Container>
)
}

const Container = styled.div`
position: fixed;
position: absolute;
bottom: 0;
left: 0;
right: 0;
height: ${({ theme }) => theme.elements.tabBar}px;
border-top: 1px solid ${({ theme }) => theme.colors.white20};
background-color: ${({ theme }) => theme.colors.black100};
`

const ContentContainer = styled.div`
max-width: ${({ theme }) => theme.maxWidths.content}px;
margin: 0 auto;
display: flex;
align-items: center;
`
Expand Down
2 changes: 2 additions & 0 deletions src/pages/game/tabs/ActionsTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ const ButtonsContainer = styled.div`
border-top: 1px solid ${({ theme }) => theme.colors.white20};
background-color: ${({ theme }) => theme.colors.black100};
width: 100%;
max-width: ${({ theme }) => theme.maxWidths.content}px;
margin: 0 auto;
padding: ${({ theme }) => theme.spacing.sm}px;
gap: ${({ theme }) => theme.spacing.sm}px;
`
Expand Down

0 comments on commit 9843d31

Please sign in to comment.