-
Notifications
You must be signed in to change notification settings - Fork 11
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
Showing
15 changed files
with
54 additions
and
99 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -27,20 +27,10 @@ const Header = () => { | |
<TopBar.Actions style={{ gap: 8 }}> | ||
<Typography>{`Logged in as ${username}`}</Typography> | ||
<IconButton title={'Log out'} icon={log_out} onClick={logOut} /> | ||
<IconButton | ||
title={'Application info'} | ||
icon={info_circle} | ||
onClick={togglePopover} | ||
ref={aboutRef} | ||
/> | ||
<IconButton title={'Application info'} icon={info_circle} onClick={togglePopover} ref={aboutRef} /> | ||
</TopBar.Actions> | ||
</TopBar> | ||
<Popover | ||
title={'About'} | ||
isOpen={isPopoverOpen} | ||
toggle={togglePopover} | ||
anchor={aboutRef.current} | ||
> | ||
<Popover title={'About'} isOpen={isPopoverOpen} toggle={togglePopover} anchor={aboutRef.current}> | ||
<VersionText /> | ||
<p>Person of contact: Eirik Ola Aksnes ([email protected])</p> | ||
</Popover> | ||
|
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,26 +1,24 @@ | ||
import { Button, Icon, Tooltip } from '@equinor/eds-core-react' | ||
import { IconData } from '@equinor/eds-icons' | ||
import { forwardRef, Ref } from 'react' | ||
import type { IconData } from '@equinor/eds-icons' | ||
import { type Ref, forwardRef } from 'react' | ||
|
||
interface IconButtonProps { | ||
title: string | ||
icon: IconData | ||
onClick: () => Promise<void> | void | ||
} | ||
|
||
const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>( | ||
function IconButton( | ||
{ title, icon, onClick }: IconButtonProps, | ||
ref: Ref<HTMLButtonElement> | ||
) { | ||
return ( | ||
<Tooltip title={title}> | ||
<Button variant="ghost_icon" onClick={onClick} ref={ref}> | ||
<Icon data={icon} size={24} title={title} /> | ||
</Button> | ||
</Tooltip> | ||
) | ||
} | ||
) | ||
const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(function IconButton( | ||
{ title, icon, onClick }: IconButtonProps, | ||
ref: Ref<HTMLButtonElement> | ||
) { | ||
return ( | ||
<Tooltip title={title}> | ||
<Button variant="ghost_icon" onClick={onClick} ref={ref}> | ||
<Icon data={icon} size={24} title={title} /> | ||
</Button> | ||
</Tooltip> | ||
) | ||
}) | ||
|
||
export default IconButton |
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,7 +1,6 @@ | ||
import styled from 'styled-components' | ||
import { Typography } from '@equinor/eds-core-react' | ||
import styled from 'styled-components' | ||
|
||
export const StyledTodoItemTitle = styled(Typography)` | ||
text-decoration: ${(props: { isStruckThrough?: boolean }) => | ||
props.isStruckThrough ? 'line-through' : 'none'}; | ||
text-decoration: ${(props: { isStruckThrough?: boolean }) => (props.isStruckThrough ? 'line-through' : 'none')}; | ||
` |
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