1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-05-07 11:05:18 +02:00
This commit is contained in:
Kushagra Gour 2022-04-07 12:56:02 +05:30
parent 98590c3ddf
commit b08c34ff59
3 changed files with 11 additions and 9 deletions

View File

@ -22,22 +22,22 @@ export function ItemTile({
>
<div class="saved-item-tile__btns">
{onForkBtnClick ? (
<a
<button
class="js-saved-item-tile__fork-btn saved-item-tile__btn hint--left hint--medium"
aria-label="Creates a duplicate of this creation (Ctrl/⌘ + F)"
onClick={onForkBtnClick}
>
Fork<span class="show-when-selected">(Ctrl/ + F)</span>
</a>
</button>
) : null}
{onRemoveBtnClick ? (
<a
<button
class="js-saved-item-tile__remove-btn saved-item-tile__btn hint--left"
aria-label="Remove"
onClick={onRemoveBtnClick}
>
X
</a>
</button>
) : null}
</div>
<div className="flex flex-v-center">

View File

@ -11,7 +11,7 @@ export default function SavedItemPane({
isOpen,
closeHandler,
onItemSelect,
onitemRemove,
onItemRemove,
onItemFork,
onExport,
mergeImportedItems
@ -23,7 +23,7 @@ export default function SavedItemPane({
useEffect(() => {
if (!itemsMap) return;
const newItems = Object.values(itemsMap);
newItems.sort(function(a, b) {
newItems.sort(function (a, b) {
return b.updatedOn - a.updatedOn;
});
setItems(newItems);
@ -50,7 +50,7 @@ export default function SavedItemPane({
}
function itemRemoveBtnClickHandler(item, e) {
e.stopPropagation();
onitemRemove(item);
onItemRemove(item);
}
function itemForkBtnClickHandler(item, e) {
e.stopPropagation();
@ -213,8 +213,8 @@ export default function SavedItemPane({
<ItemTile
item={item}
onClick={() => itemClickHandler(item)}
onForkBtnClick={() => itemForkBtnClickHandler(item)}
onRemoveBtnClick={() => itemRemoveBtnClickHandler(item)}
onForkBtnClick={e => itemForkBtnClickHandler(item, e)}
onRemoveBtnClick={e => itemRemoveBtnClickHandler(item, e)}
/>
))}
{!items.length ? (

View File

@ -1226,6 +1226,7 @@ body > #demo-frame {
.saved-item-tile__btn {
padding: 7px 10px;
color: white;
border: 0;
border-radius: 20px;
margin-left: 2px;
background: rgba(255, 255, 255, 0.1);
@ -1254,6 +1255,7 @@ body > #demo-frame {
overflow-y: auto;
overflow-x: hidden;
max-height: calc(100vh - 90px);
scroll-behavior: smooth;
}
.notifications-btn {