-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2fa7c09
commit 0c5ffee
Showing
8 changed files
with
102 additions
and
96 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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
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
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
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
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,51 +1,61 @@ | ||
import styled from "styled-components"; | ||
import LogoutIcon from "../../../public/icons/logout.svg"; | ||
import { | ||
color_canvas_secondary_inverted, | ||
} from "../../constants/colors"; | ||
|
||
type LogoutButtonProps = { | ||
children?: React.ReactNode; | ||
onClick?: () => void; | ||
}; | ||
|
||
const LogoutImage = styled(LogoutIcon)` | ||
const ButtonContainer = styled.div` | ||
display: flex; | ||
position: relative; | ||
height: 14px; | ||
justify-content: flex-start; | ||
align-items: center; | ||
padding-left: 10px; | ||
transform: translate(0, -8px); | ||
&:hover { | ||
> :nth-child(2) > * { | ||
stroke: ${({ theme }) => (theme.colors.logoutButtonIconColorHover)}; | ||
} | ||
} | ||
`; | ||
|
||
const ButtonText = styled.div` | ||
position: relative; | ||
height: 17px; | ||
margin-left: 40px; | ||
margin-right: 8px; | ||
color: ${({ theme }) => ( | ||
theme.colors.actionIconButtonTextDisabledColor | ||
theme.colors.logoutButtonTextColor | ||
)}; | ||
margin-left: 41px; | ||
margin-right: 16px; | ||
`; | ||
|
||
const Button = styled.div` | ||
display: flex; | ||
const IconContainer = styled.div` | ||
position: relative; | ||
width: 63px; | ||
height: 17px; | ||
cursor: pointer; | ||
justify-content: flex-start; | ||
align-items: center; | ||
`; | ||
|
||
&:hover { | ||
> * { | ||
background: ${({ theme }) => ( | ||
theme.colors.actionIconButtonDisabledBGHover | ||
)}; | ||
} | ||
} | ||
const StyledIcon = styled(LogoutIcon)` | ||
position: absolute; | ||
top: 1px; | ||
stroke: ${color_canvas_secondary_inverted}; | ||
`; | ||
|
||
type LogoutButtonProps = { | ||
children?: React.ReactNode; | ||
onClick?: () => void; | ||
}; | ||
|
||
export const LogoutButton = ({ | ||
children, | ||
onClick, | ||
}: LogoutButtonProps) => { | ||
return ( | ||
<Button onClick={onClick}> | ||
<ButtonContainer> | ||
<ButtonText>{children}</ButtonText> | ||
<LogoutImage /> | ||
</Button> | ||
<IconContainer onClick={onClick}> | ||
<StyledIcon /> | ||
</IconContainer> | ||
</ButtonContainer> | ||
); | ||
}; | ||
|
||
|
||
|