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: Add min-width option on alerts with default value #863
fix: Add min-width option on alerts with default value #863
Conversation
Deploy preview for fundamental-ngx ready! Built with commit a9da69f |
@@ -14,6 +14,7 @@ export class AlertComponentAsContentExampleComponent { | |||
openFromComponent() { | |||
this.alertService.open(AlertContentComponent, { | |||
type: 'warning', | |||
minWidth: '400px', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just put this one down to 300, even if it's the default. 400px will break on some phone screens which defeats the purpose of this feature. The rest seems pretty good to me though. Eventually we'll want to address #865 but that can wait for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @MattL75 I changed 400px to 300px in example.
@@ -51,6 +51,11 @@ export class AlertService { | |||
alertConfig.width = '33vw'; | |||
} | |||
|
|||
// Ensure default minimum width | |||
if (alertConfig && !alertConfig.minWidth) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When your pr #868 is merged you will be able to remove this check 👍
f61784a
to
a9da69f
Compare
Please provide a link to the associated issue.
#654
Please provide a brief summary of this pull request.
I included minimum width option to alert component which handles responsive problems. By default right now min-width is set to 300px, which means that it will look good on every device.
If this is a new feature, have you updated the documentation?
I put this option usage into one example