forked from twentyhq/twenty
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commented NavigationBar and NavigationBarItem because we are not usin…
…g them now.
- Loading branch information
1 parent
7875e71
commit 4b0fbf6
Showing
2 changed files
with
65 additions
and
65 deletions.
There are no files selected for viewing
58 changes: 29 additions & 29 deletions
58
packages/twenty-front/src/modules/ui/navigation/navigation-bar/components/NavigationBar.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
import styled from '@emotion/styled'; | ||
import { IconComponent } from 'twenty-ui'; | ||
// import styled from '@emotion/styled'; | ||
// import { IconComponent } from 'twenty-ui'; | ||
|
||
import { NavigationBarItem } from './NavigationBarItem'; | ||
// import { NavigationBarItem } from './NavigationBarItem'; | ||
|
||
const StyledContainer = styled.div` | ||
display: flex; | ||
gap: ${({ theme }) => theme.spacing(4)}; | ||
justify-content: center; | ||
padding: ${({ theme }) => theme.spacing(3)}; | ||
z-index: 1001; | ||
`; | ||
// const StyledContainer = styled.div` | ||
// display: flex; | ||
// gap: ${({ theme }) => theme.spacing(4)}; | ||
// justify-content: center; | ||
// padding: ${({ theme }) => theme.spacing(3)}; | ||
// z-index: 1001; | ||
// `; | ||
|
||
type NavigationBarProps = { | ||
activeItemName: string; | ||
items: { name: string; Icon: IconComponent; onClick: () => void }[]; | ||
}; | ||
// type NavigationBarProps = { | ||
// activeItemName: string; | ||
// items: { name: string; Icon: IconComponent; onClick: () => void }[]; | ||
// }; | ||
|
||
export const NavigationBar = ({ | ||
activeItemName, | ||
items, | ||
}: NavigationBarProps) => ( | ||
<StyledContainer> | ||
{items.map(({ Icon, name, onClick }) => ( | ||
<NavigationBarItem | ||
key={name} | ||
Icon={Icon} | ||
isActive={activeItemName === name} | ||
onClick={onClick} | ||
/> | ||
))} | ||
</StyledContainer> | ||
); | ||
// export const NavigationBar = ({ | ||
// activeItemName, | ||
// items, | ||
// }: NavigationBarProps) => ( | ||
// <StyledContainer> | ||
// {items.map(({ Icon, name, onClick }) => ( | ||
// <NavigationBarItem | ||
// key={name} | ||
// Icon={Icon} | ||
// isActive={activeItemName === name} | ||
// onClick={onClick} | ||
// /> | ||
// ))} | ||
// </StyledContainer> | ||
// ); |
72 changes: 36 additions & 36 deletions
72
...es/twenty-front/src/modules/ui/navigation/navigation-bar/components/NavigationBarItem.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,41 @@ | ||
import { useTheme } from '@emotion/react'; | ||
import styled from '@emotion/styled'; | ||
import { IconComponent } from 'twenty-ui'; | ||
// import { useTheme } from '@emotion/react'; | ||
// import styled from '@emotion/styled'; | ||
// import { IconComponent } from 'twenty-ui'; | ||
|
||
const StyledIconButton = styled.div<{ isActive?: boolean }>` | ||
align-items: center; | ||
background-color: ${({ isActive, theme }) => | ||
isActive ? theme.background.transparent.light : 'none'}; | ||
border-radius: ${({ theme }) => theme.spacing(1)}; | ||
cursor: pointer; | ||
display: flex; | ||
height: ${({ theme }) => theme.spacing(10)}; | ||
justify-content: center; | ||
transition: background-color ${({ theme }) => theme.animation.duration.fast}s | ||
ease; | ||
width: ${({ theme }) => theme.spacing(10)}; | ||
// const StyledIconButton = styled.div<{ isActive?: boolean }>` | ||
// align-items: center; | ||
// background-color: ${({ isActive, theme }) => | ||
// isActive ? theme.background.transparent.light : 'none'}; | ||
// border-radius: ${({ theme }) => theme.spacing(1)}; | ||
// cursor: pointer; | ||
// display: flex; | ||
// height: ${({ theme }) => theme.spacing(10)}; | ||
// justify-content: center; | ||
// transition: background-color ${({ theme }) => theme.animation.duration.fast}s | ||
// ease; | ||
// width: ${({ theme }) => theme.spacing(10)}; | ||
|
||
&:hover { | ||
background-color: ${({ theme }) => theme.background.transparent.light}; | ||
} | ||
`; | ||
// &:hover { | ||
// background-color: ${({ theme }) => theme.background.transparent.light}; | ||
// } | ||
// `; | ||
|
||
type NavigationBarItemProps = { | ||
Icon: IconComponent; | ||
isActive: boolean; | ||
onClick: () => void; | ||
}; | ||
// type NavigationBarItemProps = { | ||
// Icon: IconComponent; | ||
// isActive: boolean; | ||
// onClick: () => void; | ||
// }; | ||
|
||
export const NavigationBarItem = ({ | ||
Icon, | ||
isActive, | ||
onClick, | ||
}: NavigationBarItemProps) => { | ||
const theme = useTheme(); | ||
// export const NavigationBarItem = ({ | ||
// Icon, | ||
// isActive, | ||
// onClick, | ||
// }: NavigationBarItemProps) => { | ||
// const theme = useTheme(); | ||
|
||
return ( | ||
<StyledIconButton isActive={isActive} onClick={onClick}> | ||
<Icon color={theme.color.gray50} size={theme.icon.size.lg} /> | ||
</StyledIconButton> | ||
); | ||
}; | ||
// return ( | ||
// <StyledIconButton isActive={isActive} onClick={onClick}> | ||
// <Icon color={theme.color.gray50} size={theme.icon.size.lg} /> | ||
// </StyledIconButton> | ||
// ); | ||
// }; |