diff --git a/projects/angular-ui/src/lib/modal/modal-ref.ts b/projects/angular-ui/src/lib/modal/modal-ref.ts index 9947183..724267e 100644 --- a/projects/angular-ui/src/lib/modal/modal-ref.ts +++ b/projects/angular-ui/src/lib/modal/modal-ref.ts @@ -192,12 +192,14 @@ export class BaoModalRef { const strategy = this._getPositionStrategy(); if (position && (position.left || position.right)) { + // Here we will set the horizontal position of the modal (left or right). this.applyPositionStrategy(position, strategy, 'horizontal'); } else { strategy.centerHorizontally(); } if (position && (position.top || position.bottom)) { + // Here we will set the vertical position of the modal (top or bottom). this.applyPositionStrategy(position, strategy, 'vertical'); } else { strategy.centerVertically(); @@ -251,9 +253,14 @@ export class BaoModalRef { /** * Applies the position strategy to the overlay. + * + * This method sets the position of the modal based on the provided `position` configuration. + * It determines whether to apply the position to the vertical or horizontal axis based on the + * `axis` parameter. + * * @param position The position configuration for the modal. * @param strategy The position strategy to be applied. - * @param axis The axis to apply the position ('horizontal' | 'vertical') + * @param axis The axis to apply the position (`'horizontal' | 'vertical'`) */ private applyPositionStrategy( position: ModalPosition, diff --git a/projects/storybook-angular/src/stories/File/FileInput.stories.ts b/projects/storybook-angular/src/stories/File/FileInput.stories.ts index 2079ac4..29f8bcb 100644 --- a/projects/storybook-angular/src/stories/File/FileInput.stories.ts +++ b/projects/storybook-angular/src/stories/File/FileInput.stories.ts @@ -244,10 +244,10 @@ export const baoFileIntl: StoryFn = args => ({

By default, the File Input component displays its texts in french. To display text in another language, here are the steps to follow:

    -
  1. In your app.module.ts, import BaoFileIntl and BaoFileIntlEnglish for texts in english from @villedemontreal/angular-ui.
  2. +
  3. In your app.module.ts, import BaoFileIntl and BaoFileIntlEnglish for texts in english from @villedemontreal/angular-ui.
  4. If you need to use the component in a different language, you can declare your own class that extends BaoFileIntl and contains texts in your prefered language. It should look like this:

    - @Injectable()
    + @Injectable()
    class BaoFileIntlEnglish extends BaoFileIntl {{ '{' }}

    dropzoneButtonLabel = 'Browse';