Fix delete sliders from swiper (#195)

This commit is contained in:
Ilya Y 2023-08-26 13:45:35 +03:00 committed by GitHub
parent f423f22741
commit a619610c07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 8 deletions

View File

@ -316,18 +316,18 @@ export const SolidSwiper = (props: Props) => {
type="text" type="text"
class={clsx(styles.input, styles.title)} class={clsx(styles.input, styles.title)}
placeholder={t('Enter image title')} placeholder={t('Enter image title')}
value={props.images[slideIndex()].title} value={props.images[slideIndex()]?.title}
onChange={(event) => handleSlideDescriptionChange(slideIndex(), 'title', event.target.value)} onChange={(event) => handleSlideDescriptionChange(slideIndex(), 'title', event.target.value)}
/> />
<input <input
type="text" type="text"
class={styles.input} class={styles.input}
placeholder={t('Specify the source and the name of the author')} placeholder={t('Specify the source and the name of the author')}
value={props.images[slideIndex()].source} value={props.images[slideIndex()]?.source}
onChange={(event) => handleSlideDescriptionChange(slideIndex(), 'source', event.target.value)} onChange={(event) => handleSlideDescriptionChange(slideIndex(), 'source', event.target.value)}
/> />
<SimplifiedEditor <SimplifiedEditor
initialContent={props.images[slideIndex()].body} initialContent={props.images[slideIndex()]?.body}
smallHeight={true} smallHeight={true}
placeholder={t('Enter image description')} placeholder={t('Enter image description')}
onChange={(value) => setSlideBody(value)} onChange={(value) => setSlideBody(value)}

View File

@ -93,8 +93,9 @@ $navigation-reserve: 32px;
position: absolute; position: absolute;
top: 16px; top: 16px;
right: 16px; right: 16px;
background: rgba(#000, 0.3); background: rgba(var(--default-color), 0.3);
cursor: pointer; cursor: pointer;
z-index: 12;
display: none; display: none;
.icon { .icon {
@ -129,14 +130,14 @@ $navigation-reserve: 32px;
background: var(--placeholder-color-semi); background: var(--placeholder-color-semi);
position: relative; position: relative;
&:hover .action {
display: flex;
}
img { img {
max-height: 100%; max-height: 100%;
} }
} }
&:hover .action {
display: flex;
}
} }
&.editorMode { &.editorMode {
.holder { .holder {