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

fix(alert): new css class for close button #3976

Merged
merged 1 commit into from Jan 28, 2021

Conversation

nbittich
Copy link
Contributor

Before submitting a pull request, please make sure you have at least performed the following:

  • read and followed the CONTRIBUTING.md and DEVELOPER.md guide.
  • built and tested the changes locally.
  • added/updated any applicable tests.
  • added/updated any applicable API documentation.
  • added/updated any applicable demos.

Copy link
Member

@maxokorokov maxokorokov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@fbasso, could you take a look too, please? Please merge if OK.
I've added the reference to it in the main BS5 issue

@maxokorokov maxokorokov added this to the 10.0.0 milestone Jan 27, 2021
@maxokorokov
Copy link
Member

P.S. We're going to need the same kind of PR for the toast, if you're up to it. And thanks @nbittich for helping out.

@nbittich
Copy link
Contributor Author

nbittich commented Jan 27, 2021

P.S. We're going to need the same kind of PR for the toast, if you're up to it. And thanks @nbittich for helping out.

Sure I will have a look to the toast this evening after work. I was working on the accordion yesterday, did something like below, unfortunately it breaks the "custom" one in the demo. Can look at it also if needed.

    <ng-template #t ngbPanelHeader let-panel>
    <div class="accordion-header">
      <button class="accordion-button" [ngbPanelToggle]="panel">
        {{panel.title}}<ng-template [ngTemplateOutlet]="panel.titleTpl?.templateRef"></ng-template>
      </button>
    </div>
    </ng-template>
    <ng-template ngFor let-panel [ngForOf]="panels">
      <div [class]="'accordion-item ' + (panel.cardClass || '')">
        <div role="tab" id="{{panel.id}}-header" [class]="' ' + (panel.type ? 'bg-'+panel.type: type ? 'bg-'+type : '')">
          <ng-template [ngTemplateOutlet]="panel.headerTpl?.templateRef || t"
                       [ngTemplateOutletContext]="{$implicit: panel, opened: panel.isOpen}"></ng-template>
        </div>
        <div id="{{panel.id}}" role="tabpanel" [attr.aria-labelledby]="panel.id + '-header'" [class]="'accordion-collapse'"
             *ngIf="!destroyOnHide || panel.isOpen || panel.transitionRunning">
          <div class="accordion-body">
               <ng-template [ngTemplateOutlet]="panel.contentTpl?.templateRef || null"></ng-template>
          </div>
        </div>
      </div>
    </ng-template>
   

@maxokorokov
Copy link
Member

@nbittich, we'd like to deprecate existing accordion and create a new one based on directives (similar to navs) → #3898

Not sure/haven't looked yet what has to be done for the existing one:

  • keep markup and classes as-is, but add custom css in ng-bootstrap
  • or use new accordion classes

@maxokorokov maxokorokov merged commit 5661028 into ng-bootstrap:bootstrap5 Jan 28, 2021
fbasso pushed a commit that referenced this pull request Mar 10, 2021
Co-authored-by: Nordine Bittich <nordine.bittich@ext.europa.ec.eu>
fbasso pushed a commit to fbasso/ng-bootstrap that referenced this pull request Mar 12, 2021
Co-authored-by: Nordine Bittich <nordine.bittich@ext.europa.ec.eu>
fbasso pushed a commit that referenced this pull request Mar 25, 2021
Co-authored-by: Nordine Bittich <nordine.bittich@ext.europa.ec.eu>
fbasso pushed a commit to fbasso/ng-bootstrap that referenced this pull request May 12, 2021
Co-authored-by: Nordine Bittich <nordine.bittich@ext.europa.ec.eu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants