Refactor #3965 - Update for Sidebar

pull/4041/head^2
Tuğçe Küçükoğlu 2023-06-09 12:25:46 +03:00
parent 1625d6e4f5
commit 61cd94c2e5
2 changed files with 3 additions and 3 deletions

View File

@ -199,7 +199,7 @@ const classes = {
header: 'p-sidebar-header',
headerContent: 'p-sidebar-header-content',
closeButton: 'p-sidebar-close p-sidebar-icon p-link',
closeIcon: ({ props }) => ['p-sidebar-close-icon ', props.closeIcon],
closeIcon: 'p-sidebar-close-icon',
content: 'p-sidebar-content'
};

View File

@ -9,7 +9,7 @@
</div>
<button v-if="showCloseIcon" :ref="closeButtonRef" v-ripple autofocus type="button" :class="cx('closeButton')" :aria-label="closeAriaLabel" @click="hide" v-bind="ptm('closeButton')">
<slot name="closeicon">
<component :is="closeIcon ? 'span' : 'TimesIcon'" :class="cx('closeIcon')" v-bind="ptm('closeIcon')"></component>
<component :is="closeIcon ? 'span' : 'TimesIcon'" :class="[cx('closeIcon'), closeIcon]" v-bind="ptm('closeIcon')"></component>
</slot>
</button>
</div>
@ -23,12 +23,12 @@
</template>
<script>
import BaseSidebar from './BaseSidebar.vue';
import FocusTrap from 'primevue/focustrap';
import TimesIcon from 'primevue/icons/times';
import Portal from 'primevue/portal';
import Ripple from 'primevue/ripple';
import { DomHandler, ZIndexUtils } from 'primevue/utils';
import BaseSidebar from './BaseSidebar.vue';
export default {
name: 'Sidebar',