Skip to content

Commit

Permalink
Merge branch 'dev' into feature/#498-calculate-bounds-add-some-extra-…
Browse files Browse the repository at this point in the history
…spacing
  • Loading branch information
brauliodiez authored Nov 6, 2024
2 parents bf06208 + 686aa9f commit 0f7eac6
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 1 deletion.
15 changes: 15 additions & 0 deletions src/common/components/icons/caret-down-icon.component.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export const CaretDown = () => {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width="1.2em"
height="1.2em"
viewBox="0 0 256 256"
>
<path
fill="currentColor"
d="m213.66 101.66l-80 80a8 8 0 0 1-11.32 0l-80-80A8 8 0 0 1 48 88h160a8 8 0 0 1 5.66 13.66"
/>
</svg>
);
};
1 change: 1 addition & 0 deletions src/common/components/icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ export * from './copy-icon.component';
export * from './paste-icon.component';
export * from './delete-icon.component';
export * from './pencil-icon.component';
export * from './caret-down-icon.component';
22 changes: 21 additions & 1 deletion src/pods/thumb-pages/components/thumb-page.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,28 @@
border: 3px solid;
border-color: black;
border-radius: 5px;
position: 'relative';
position: relative;
background-color: white;
margin-top: 10px;
padding: 5px;
padding-bottom: 0px;
}

.icon-container > svg {
position: absolute;
bottom: 8px;
right: 8px;
width: 12px;
height: 12px;
cursor: pointer;
}

.icon-container > svg:hover {
background-color: var(--primary-100);
position: absolute;
bottom: 8px;
right: 8px;
width: 12px;
height: 12px;
cursor: pointer;
}
7 changes: 7 additions & 0 deletions src/pods/thumb-pages/components/thumb-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { Layer, Stage } from 'react-konva';
import { calculateScaleBasedOnBounds } from './thumb-page.business';
import { ThumbPageContextMenu } from './context-menu';
import { useContextMenu } from '../use-context-menu-thumb.hook';
import { CaretDown } from '@/common/components/icons';
import classes from './thumb-page.module.css';

interface Props {
Expand Down Expand Up @@ -57,6 +58,12 @@ export const ThumbPage: React.FunctionComponent<Props> = props => {
})}
</Layer>
</Stage>
<span
onClick={handleShowContextMenu}
className={classes['icon-container']}
>
<CaretDown />
</span>
{showContextMenu && (
<ThumbPageContextMenu
contextMenuRef={contextMenuRef}
Expand Down

0 comments on commit 0f7eac6

Please sign in to comment.