mirror of
https://github.com/chinchang/web-maker.git
synced 2025-03-24 12:39:51 +01:00
fix action btns in list
This commit is contained in:
parent
93b6773361
commit
f28b5405a0
@ -254,30 +254,28 @@ const Assets = () => {
|
||||
}`}
|
||||
>
|
||||
{/* <a href={file.url} target="_blank" rel="noopener noreferrer"> */}
|
||||
<div class="d-f relative">
|
||||
<img src={file.url} />{' '}
|
||||
<div class="asset-manager__file-actions">
|
||||
<Stack gap={1} fullWidth justify="center">
|
||||
<button
|
||||
class={`btn btn--dark ${
|
||||
listType === 'list' ? 'btn--active' : ''
|
||||
} hint--rounded hint--top-left`}
|
||||
onClick={() => copyFileUrl(file.url)}
|
||||
aria-label="Copy URL"
|
||||
>
|
||||
<Icon name="copy" />
|
||||
</button>
|
||||
<button
|
||||
class={`btn btn--dark ${
|
||||
listType === 'list' ? 'btn--active' : ''
|
||||
} hint--rounded hint--top-left`}
|
||||
onClick={() => removeFileHandler(index)}
|
||||
aria-label="Delete"
|
||||
>
|
||||
<Icon name="trash" />
|
||||
</button>
|
||||
</Stack>
|
||||
</div>
|
||||
<img src={file.url} />{' '}
|
||||
<div class="asset-manager__file-actions">
|
||||
<Stack gap={1} fullWidth justify="center">
|
||||
<button
|
||||
class={`btn btn--dark ${
|
||||
listType === 'list' ? 'btn--active' : ''
|
||||
} hint--rounded hint--top-left`}
|
||||
onClick={() => copyFileUrl(file.url)}
|
||||
aria-label="Copy URL"
|
||||
>
|
||||
<Icon name="copy" />
|
||||
</button>
|
||||
<button
|
||||
class={`btn btn--dark ${
|
||||
listType === 'list' ? 'btn--active' : ''
|
||||
} hint--rounded hint--top-left`}
|
||||
onClick={() => removeFileHandler(index)}
|
||||
aria-label="Delete"
|
||||
>
|
||||
<Icon name="trash" />
|
||||
</button>
|
||||
</Stack>
|
||||
</div>
|
||||
<span class="asset-manager__file-name">{file.name}</span>
|
||||
{/* </a> */}
|
||||
|
@ -2125,6 +2125,7 @@ while the theme CSS file is loading */
|
||||
.asset-manager__file {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
position: relative;
|
||||
}
|
||||
.asset-manager__file-name {
|
||||
max-width: 100%;
|
||||
@ -2145,7 +2146,6 @@ while the theme CSS file is loading */
|
||||
.asset-manager__file-actions {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
opacity: 0;
|
||||
padding: 0.5rem 0;
|
||||
@ -2155,6 +2155,10 @@ while the theme CSS file is loading */
|
||||
background-color: rgb(255 255 255 / 15%);
|
||||
backdrop-filter: blur(5px);
|
||||
}
|
||||
.asset-manager__file--grid .asset-manager__file-actions {
|
||||
left: 0;
|
||||
bottom: 1.5em;
|
||||
}
|
||||
.asset-manager__file:hover .asset-manager__file-actions {
|
||||
transform: translateY(0rem);
|
||||
opacity: 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user