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"
class={clsx(styles.input, styles.title)}
placeholder={t('Enter image title')}
value={props.images[slideIndex()].title}
value={props.images[slideIndex()]?.title}
onChange={(event) => handleSlideDescriptionChange(slideIndex(), 'title', event.target.value)}
/>
<input
type="text"
class={styles.input}
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)}
/>
<SimplifiedEditor
initialContent={props.images[slideIndex()].body}
initialContent={props.images[slideIndex()]?.body}
smallHeight={true}
placeholder={t('Enter image description')}
onChange={(value) => setSlideBody(value)}

View File

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