@@ -23,7 +23,7 @@ const Shape = dynamic(import("react-clip-path"), { ssr: false });
2323import Switch from "react-switch" ;
2424
2525// icons
26- import { FiCopy , FiDownload , FiLock } from 'react-icons/fi' ;
26+ import { FiCopy , FiDelete , FiDownload , FiEdit2 , FiLock , FiTrash2 } from 'react-icons/fi' ;
2727import { BiExport } from "react-icons/bi" ;
2828import { BsFillHeartFill , BsHeart } from "react-icons/bs" ;
2929
@@ -65,13 +65,24 @@ const ShapeCard = styled.div`
6565 }
6666` ;
6767
68- const ShapeActionsContainer = styled . div `
68+ const ShapeActionsPrimary = styled . div `
6969 padding: 2rem;
7070 display: flex;
7171 grid-gap: 1rem;
7272 justify-content: center;
7373` ;
7474
75+ const ShapeActionsSecondary = styled . div `
76+ padding: 2rem;
77+ display: flex;
78+ grid-gap: 1rem;
79+ justify-content: center;
80+
81+ button {
82+ flex: 1;
83+ }
84+ ` ;
85+
7586const ShapeActions = styled . div `
7687 opacity: 0;
7788 background: rgba(var(--color-neutral-100-rgb), 0.5);
@@ -83,10 +94,14 @@ const ShapeActions = styled.div`
8394 left: 0;
8495 display: flex;
8596 flex-direction: column;
86- justify-content: center ;
97+ justify-content: space-between ;
8798` ;
8899
89100const ShapeName = styled . h4 `
101+ display: flex;
102+ justify-content: flex-start;
103+ align-items: center;
104+ grid-gap: .3rem;
90105 margin: 0 0 0.8rem 0;
91106 font-weight: var(--fw-bold);
92107 font-size: var(--fs-rg);
@@ -435,7 +450,7 @@ const ShapeList = (
435450 < ShapeCard >
436451 < ShapeCardBody >
437452 < ShapeNameHeader >
438- < ShapeName > { shape . name } { shape . private && < FiLock /> } </ ShapeName >
453+ < ShapeName > { shape . name } { shape . private && < FiLock color = 'var(--color-neutral-50)' /> } </ ShapeName >
439454 < ShapeLikes > < LikeFilledIcon size = '16px' color = 'var(--color-neutral-40)' /> < ShapeLikesCount > { shape . likes } </ ShapeLikesCount > </ ShapeLikes >
440455 </ ShapeNameHeader >
441456 < Shape
@@ -448,7 +463,7 @@ const ShapeList = (
448463 showShadow = { shape . showAdvanced }
449464 />
450465 < ShapeActions className = "shape-actions" >
451- < ShapeActionsContainer >
466+ < ShapeActionsPrimary >
452467 < span
453468 onClick = { ( event , shapeId ) => performLike ( event , shape [ 'shape_id' ] ) } >
454469 {
@@ -460,32 +475,36 @@ const ShapeList = (
460475 )
461476 :
462477 (
463- < Button title = "Add Like" variant = "outline-light " className = "btn-icon btn-icon--rounded" >
478+ < Button title = "Add Like" variant = "outline-secondary " className = "btn-icon btn-icon--rounded" >
464479 < LikeIcon size = { 24 } />
465480 </ Button >
466481 )
467482 }
468483
469484 </ span > { " " }
470- < Button title = "Export Shape" variant = "outline-light " onClick = { ( ) => performExport ( shape ) } className = "btn-icon btn-icon--rounded" >
485+ < Button title = "Export Shape" variant = "outline-secondary " onClick = { ( ) => performExport ( shape ) } className = "btn-icon btn-icon--rounded" >
471486 < ExportIcon
472487 size = { 24 } />
473488 </ Button >
474- < Button title = "Copy Source" variant = "outline-light " onClick = { ( ) => performCopySource ( shape ) } className = "btn-icon btn-icon--rounded" >
489+ < Button title = "Copy Source" variant = "outline-secondary " onClick = { ( ) => performCopySource ( shape ) } className = "btn-icon btn-icon--rounded" >
475490 < CopyIcon
476491 size = { 24 } />
477492 </ Button >
478- { shape . private ?
479- < Button title = "Edit Shape" vairant = "outline-light" onClick = { ( ) => { performEdit ( shape ) ; console . log ( shape ) } } className = "btn-icon" >
480- Edit
481- </ Button > : null
482- }
483- { shape . private ?
484- < Button title = "Delete Shape" vairant = "outline-light" onClick = { ( ) => { performDelete ( shape ) ; console . log ( shape ) } } className = "btn-icon" >
485- Delete
486- </ Button > : null
487- }
488- </ ShapeActionsContainer >
493+ </ ShapeActionsPrimary >
494+ < ShapeActionsSecondary >
495+ { shape . private ?
496+ < Button title = "Edit Shape" size = 'sm' variant = "outline-secondary" onClick = { ( ) => { performEdit ( shape ) ; console . log ( shape ) } } >
497+ < FiEdit2 />
498+ Edit
499+ </ Button > : null
500+ }
501+ { shape . private ?
502+ < Button title = "Delete Shape" size = 'sm' variant = "outline-secondary" onClick = { ( ) => { performDelete ( shape ) ; console . log ( shape ) } } >
503+ < FiTrash2 />
504+ Delete
505+ </ Button > : null
506+ }
507+ </ ShapeActionsSecondary >
489508 </ ShapeActions >
490509 </ ShapeCardBody >
491510 < ShapeCardHeader >
0 commit comments