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', header: 'p-sidebar-header',
headerContent: 'p-sidebar-header-content', headerContent: 'p-sidebar-header-content',
closeButton: 'p-sidebar-close p-sidebar-icon p-link', 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' content: 'p-sidebar-content'
}; };

View File

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