-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove react menu and add toolbar icons
- Loading branch information
1 parent
cb9c9cd
commit efbd5d3
Showing
14 changed files
with
131 additions
and
118 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import React, { ReactElement } from 'react'; | ||
import styled from 'styled-components'; | ||
import { AnnotationProps } from './../../types'; | ||
import CircleSvg from './icons/circle.svg'; | ||
import PointSvg from './icons/point.svg'; | ||
import SquareSvg from './icons/square.svg'; | ||
import TrashSvg from './icons/trash.svg'; | ||
|
||
const OptionsBarDiv = styled.div` | ||
border: 1px solid #ccc; | ||
background-color: #efefef; | ||
width: 100%; | ||
display: flex; | ||
`; | ||
|
||
const StyledIcon = styled.a` | ||
border-right: 1px solid #ccc; | ||
width: 40px; | ||
height: 40px; | ||
background-repeat: no-repeat; | ||
background-position: center; | ||
cursor: pointer; | ||
`; | ||
|
||
const CircleIcon = styled(StyledIcon)` | ||
background-image: url(${CircleSvg}); | ||
`; | ||
const PointIcon = styled(StyledIcon)` | ||
background-image: url(${PointSvg}); | ||
`; | ||
const SquareIcon = styled(StyledIcon)` | ||
background-image: url(${SquareSvg}); | ||
`; | ||
const TrashIcon = styled(StyledIcon)` | ||
background-image: url(${TrashSvg}); | ||
`; | ||
|
||
// https://www.w3schools.com/howto/howto_css_icon_bar.asp# | ||
export default function ToolBar(props: AnnotationProps): ReactElement { | ||
console.log(props); | ||
return ( | ||
<OptionsBarDiv> | ||
<CircleIcon /> | ||
<PointIcon /> | ||
<SquareIcon /> | ||
<TrashIcon /> | ||
</OptionsBarDiv> | ||
); | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
declare module '*.svg' { | ||
const content: any; | ||
export default content; | ||
} |
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