Responsive BetaCard on Labs (#8154)
parent
a7a0c55adf
commit
f557ac9486
|
@ -23,8 +23,13 @@ limitations under the License.
|
||||||
|
|
||||||
.mx_BetaCard_columns {
|
.mx_BetaCard_columns {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-flow: wrap;
|
||||||
|
gap: 20px;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
.mx_BetaCard_columns_description {
|
||||||
|
flex: 1;
|
||||||
|
|
||||||
> div {
|
|
||||||
.mx_BetaCard_title {
|
.mx_BetaCard_title {
|
||||||
font-weight: $font-semi-bold;
|
font-weight: $font-semi-bold;
|
||||||
font-size: $font-18px;
|
font-size: $font-18px;
|
||||||
|
@ -32,47 +37,60 @@ limitations under the License.
|
||||||
color: $primary-content;
|
color: $primary-content;
|
||||||
margin: 4px 0 14px;
|
margin: 4px 0 14px;
|
||||||
|
|
||||||
.mx_BetaCard_betaPill {
|
display: flex;
|
||||||
margin-left: 12px;
|
align-items: center;
|
||||||
}
|
column-gap: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_BetaCard_caption {
|
.mx_BetaCard_caption {
|
||||||
font-size: $font-15px;
|
font-size: $font-15px;
|
||||||
line-height: $font-20px;
|
line-height: $font-20px;
|
||||||
color: $secondary-content;
|
color: $secondary-content;
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_BetaCard_buttons .mx_AccessibleButton {
|
.mx_BetaCard_buttons {
|
||||||
display: block;
|
display: flex;
|
||||||
margin: 12px 0;
|
flex-wrap: wrap-reverse;
|
||||||
padding: 7px 40px;
|
gap: 12px;
|
||||||
width: auto;
|
margin: 20px auto;
|
||||||
|
|
||||||
|
.mx_AccessibleButton {
|
||||||
|
padding: 7px 40px;
|
||||||
|
width: auto;
|
||||||
|
flex: 1;
|
||||||
|
white-space: nowrap; // text might overflow
|
||||||
|
|
||||||
|
&:nth-child(1) {
|
||||||
|
order: 2; // Place feedback button top and right
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_BetaCard_disclaimer {
|
.mx_BetaCard_disclaimer {
|
||||||
font-size: $font-12px;
|
font-size: $font-12px;
|
||||||
line-height: $font-15px;
|
line-height: $font-15px;
|
||||||
color: $secondary-content;
|
color: $secondary-content;
|
||||||
margin-top: 20px;
|
|
||||||
|
|
||||||
> h4 {
|
> h4 {
|
||||||
margin: 0;
|
margin: 12px 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
> p {
|
> p {
|
||||||
margin-top: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
> img {
|
.mx_BetaCard_columns_image_wrapper {
|
||||||
margin: auto 0 auto 20px;
|
margin: auto 0;
|
||||||
width: 300px;
|
|
||||||
object-fit: contain;
|
.mx_BetaCard_columns_image {
|
||||||
height: 100%;
|
width: 100%;
|
||||||
border-radius: 4px;
|
max-width: 300px;
|
||||||
|
object-fit: contain;
|
||||||
|
height: 100%;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -101,12 +101,12 @@ const BetaCard = ({ title: titleOverride, featureId }: IProps) => {
|
||||||
|
|
||||||
return <div className="mx_BetaCard">
|
return <div className="mx_BetaCard">
|
||||||
<div className="mx_BetaCard_columns">
|
<div className="mx_BetaCard_columns">
|
||||||
<div>
|
<div className="mx_BetaCard_columns_description">
|
||||||
<h3 className="mx_BetaCard_title">
|
<h3 className="mx_BetaCard_title">
|
||||||
{ titleOverride || _t(title) }
|
<span>{ titleOverride || _t(title) }</span>
|
||||||
<BetaPill />
|
<BetaPill />
|
||||||
</h3>
|
</h3>
|
||||||
<span className="mx_BetaCard_caption">{ caption() }</span>
|
<div className="mx_BetaCard_caption">{ caption() }</div>
|
||||||
<div className="mx_BetaCard_buttons">
|
<div className="mx_BetaCard_buttons">
|
||||||
{ feedbackButton }
|
{ feedbackButton }
|
||||||
<AccessibleButton
|
<AccessibleButton
|
||||||
|
@ -132,7 +132,9 @@ const BetaCard = ({ title: titleOverride, featureId }: IProps) => {
|
||||||
{ disclaimer(value) }
|
{ disclaimer(value) }
|
||||||
</div> }
|
</div> }
|
||||||
</div>
|
</div>
|
||||||
<img src={image} alt="" />
|
<div className="mx_BetaCard_columns_image_wrapper">
|
||||||
|
<img className="mx_BetaCard_columns_image" src={image} alt="" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{ extraSettings && value && <div className="mx_BetaCard_relatedSettings">
|
{ extraSettings && value && <div className="mx_BetaCard_relatedSettings">
|
||||||
{ extraSettings.map(key => (
|
{ extraSettings.map(key => (
|
||||||
|
|
Loading…
Reference in New Issue