Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sidebar: custom or predefined close button position #13741

Closed
akhalaiav opened this issue Sep 26, 2023 · 2 comments
Closed

Sidebar: custom or predefined close button position #13741

akhalaiav opened this issue Sep 26, 2023 · 2 comments
Labels
Status: Discussion Issue or pull request needs to be discussed by Core Team Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible Type: New Feature Issue contains a new feature or new component request

Comments

@akhalaiav
Copy link

akhalaiav commented Sep 26, 2023

Describe the feature you would like to see added

In existing functionality, we can only show or hide the close button.

Documentation https://primeng.org/sidebar#api.sidebar .

show:
Снимок экрана 2023-09-25 в 17 33 37

hide:
Снимок экрана 2023-09-25 в 17 33 22

but in my case, I would like to have the custom close button outside of the sidebar.

like :
Снимок экрана 2023-09-25 в 17 33 22 — копия

or
Снимок экрана 2023-09-26 в 09 44 13

Is it possible to implement this functionality?

Is your feature request related to a problem?

No response

Describe the solution you'd like

Will be better when we have something like that:

<p-sidebar closeButtonPosition="outside">
    ...
</p-sidebar>

Describe alternatives you have considered

We can hide the close button and create some manual close button with styles, but I think it is not a good idea.

Additional context

Current:
PrimeNg Version - 16.3.1
Node 18

Environment
Latest Angular and Primeng version

@akhalaiav akhalaiav added Status: Discussion Issue or pull request needs to be discussed by Core Team Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible Type: New Feature Issue contains a new feature or new component request labels Sep 26, 2023
@akhalaiav
Copy link
Author

it can be implemented like

<p-sidebar>
      <p-button
          (onClick)="onHide()"
          [outlined]="true"
          [rounded]="true"
          [style]="{top: '20px', left: '20%' }"
          ariaLabel="Outlined Close Button"
          class="hidden md:block"
          icon="pi pi-times font-bold"
          styleClass="fixed text-white border-2 focus:shadow-none font-normal"
      ></p-button>
</p-sidebar>

@mehmetcetin01140
Copy link
Contributor

Hi,

So sorry for the delayed response! Improvements have been made to many components recently, both in terms of performance and enhancement. Therefore, this improvement may have been developed in another issue ticket without realizing it. You can check this in the documentation. If there is no improvement on this, can you open a new issue so we can include it in our roadmap?

Thanks a lot for your understanding!
Best Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Discussion Issue or pull request needs to be discussed by Core Team Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible Type: New Feature Issue contains a new feature or new component request
Projects
None yet
Development

No branches or pull requests

2 participants