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

restrict alert sb image max size #336

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/css/components/_alert.scss
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@
@include justify-content(center);
}

.btn-type-BOTH .soft-button-image {
max-width: 50%;
}
Copy link
Contributor

@jacobkeeler jacobkeeler Dec 21, 2020

Choose a reason for hiding this comment

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

Unfortunately I'm seeing similarly odd things in other cases with BOTH softbuttons. Notably it seems to occur with templated dynamic images specifically. The margin seems to be what is off in this case.


.alert-button-3 {
//height: 123.333333334px;
height: 75px;
Expand Down
6 changes: 3 additions & 3 deletions src/js/AlertButtons.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default class AlertButtons extends React.Component {
})
} else if (softButtons.length === 2) {
items = softButtons.map((softButton, index) => {
return (<div className={`${this.props.classPrefix}-button-2 th-f-color t-small t-light th-bg-color th-soft-buttons`}
return (<div className={`${this.props.classPrefix}-button-2 btn-type-${softButton.type} th-f-color t-small t-light th-bg-color th-soft-buttons`}
key={softButton.softButtonID}
onClick={() => this.getAction(softButton)}>
<p>{softButton.text}</p>
Expand All @@ -60,7 +60,7 @@ export default class AlertButtons extends React.Component {
})
} else if (softButtons.length === 3) {
items = softButtons.map((softButton, index) => {
return (<div className={`${this.props.classPrefix}-button-3 th-f-color t-small t-light th-bg-color th-soft-buttons`}
return (<div className={`${this.props.classPrefix}-button-3 btn-type-${softButton.type} th-f-color t-small t-light th-bg-color th-soft-buttons`}
key={softButton.softButtonID}
onClick={() => this.getAction(softButton)}>
<p>{softButton.text}</p>
Expand All @@ -73,7 +73,7 @@ export default class AlertButtons extends React.Component {
})
} else if (softButtons.length === 4) {
items = softButtons.map((softButton, index) => {
return (<div className={`${this.props.classPrefix}-button-4 th-f-color t-small t-light th-bg-color th-soft-buttons`}
return (<div className={`${this.props.classPrefix}-button-4 btn-type-${softButton.type} th-f-color t-small t-light th-bg-color th-soft-buttons`}
key={softButton.softButtonID}
onClick={() => this.getAction(softButton)}>
<p>{softButton.text}</p>
Expand Down