Skip to content

Commit

Permalink
fix(bootstrap): set proper types for size and dialogClass in `BSM…
Browse files Browse the repository at this point in the history
…odalContextBuilder`

closes #205
  • Loading branch information
Shlomi Assaf (shlassaf) committed Oct 5, 2016
1 parent 5dfc9aa commit 955b02b
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions src/components/angular2-modal/plugins/bootstrap/modal-context.ts
Expand Up @@ -28,10 +28,12 @@ export class BSModalContext extends ModalOpenContext {
dialogClass: string;

/**
* Size of the modal.
* 'lg' or 'sm' only.
* Size of the modal. 'lg' or 'sm' only.
*
* If you want to use custom sizes leave this empty and set the dialogClass property.
* e.g: dialogClass = 'modal-dialog my-custom-dialog`
* NOTE: No validation.
* Default to ''
* Default: ''
*/
size: BootstrapModalSize;

Expand All @@ -50,24 +52,24 @@ export class BSModalContext extends ModalOpenContext {
}
}

interface Class<T> {
new(): T;
}

export class BSModalContextBuilder<T extends BSModalContext> extends ModalOpenContextBuilder<T> {
/**
* Size of the modal.
* 'lg' or 'sm' only.
* NOTE: No validation.
* Default to 'lg'
* A Class for the modal dialog container.
* Default: modal-dialog
*/
size: FluentAssignMethod<string, this>;
dialogClass: FluentAssignMethod<string, this>;

/**
* A Class for the modal dialog container.
* Default: modal-dialog
* Size of the modal. 'lg' or 'sm' only.
*
* If you want to use custom sizes leave this empty and set the dialogClass property.
* e.g: dialogClass = 'modal-dialog my-custom-dialog`
* NOTE: No validation.
* Default: ''
*/
dialogClass: FluentAssignMethod<BootstrapModalSize, this>;
size: FluentAssignMethod<BootstrapModalSize, this>;


/**
* When true, show a close button on the top right corner.
Expand Down

0 comments on commit 955b02b

Please sign in to comment.