mirror of
https://github.com/chinchang/web-maker.git
synced 2025-07-17 20:11:12 +02:00
template reordering and ui improvement
This commit is contained in:
@@ -21,6 +21,7 @@ export function CreateNewModal({
|
|||||||
<div class="saved-items-pane__container">
|
<div class="saved-items-pane__container">
|
||||||
{templates.map(template => (
|
{templates.map(template => (
|
||||||
<ItemTile
|
<ItemTile
|
||||||
|
inline
|
||||||
item={template}
|
item={template}
|
||||||
focusable
|
focusable
|
||||||
onClick={onTemplateSelect.bind(null, template)}
|
onClick={onTemplateSelect.bind(null, template)}
|
||||||
|
@@ -7,13 +7,16 @@ export function ItemTile({
|
|||||||
onClick,
|
onClick,
|
||||||
onForkBtnClick,
|
onForkBtnClick,
|
||||||
onRemoveBtnClick,
|
onRemoveBtnClick,
|
||||||
focusable
|
focusable,
|
||||||
|
inline
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
role={focusable ? 'button' : null}
|
role={focusable ? 'button' : null}
|
||||||
tabindex={focusable ? 0 : null}
|
tabindex={focusable ? 0 : null}
|
||||||
class="js-saved-item-tile saved-item-tile"
|
class={`js-saved-item-tile saved-item-tile ${
|
||||||
|
inline ? 'saved-item-tile--inline' : ''
|
||||||
|
}`}
|
||||||
data-item-id={item.id}
|
data-item-id={item.id}
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
>
|
>
|
||||||
|
@@ -968,7 +968,11 @@ body > #demo-frame {
|
|||||||
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2);
|
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2);
|
||||||
animation: slide-left 0.35s ease forwards;
|
animation: slide-left 0.35s ease forwards;
|
||||||
}
|
}
|
||||||
|
.saved-item-tile--inline {
|
||||||
|
display: inline-block;
|
||||||
|
margin-left: 10px;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
.saved-item-tile:nth-child(1) {
|
.saved-item-tile:nth-child(1) {
|
||||||
animation-delay: 0.2s;
|
animation-delay: 0.2s;
|
||||||
}
|
}
|
||||||
|
@@ -1,9 +1,4 @@
|
|||||||
export default [
|
export default [
|
||||||
{
|
|
||||||
id: 'preact',
|
|
||||||
title: 'Preact',
|
|
||||||
img: 'assets/preact-logo.svg'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
id: 'react',
|
id: 'react',
|
||||||
title: 'React',
|
title: 'React',
|
||||||
@@ -14,6 +9,11 @@ export default [
|
|||||||
title: 'Vue',
|
title: 'Vue',
|
||||||
img: 'assets/vue-logo.svg'
|
img: 'assets/vue-logo.svg'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: 'preact',
|
||||||
|
title: 'Preact',
|
||||||
|
img: 'assets/preact-logo.svg'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: 'kontra-game-engine',
|
id: 'kontra-game-engine',
|
||||||
title: 'Kontra Game Engine',
|
title: 'Kontra Game Engine',
|
||||||
|
Reference in New Issue
Block a user