Merged in fix/LOY-500-use-points-button-css-not-correct (pull request #3301)
fix(LOY-500): fixed correct css for use points button * fix(LOY-500): fixed styling for use points button * fix(LOY-500): fix Approved-by: Matilda Landström
This commit is contained in:
@@ -26,14 +26,21 @@
|
|||||||
.pointsNumber {
|
.pointsNumber {
|
||||||
color: var(--Text-Brand-OnPrimary-1-Accent);
|
color: var(--Text-Brand-OnPrimary-1-Accent);
|
||||||
}
|
}
|
||||||
|
@media screen and (max-width: 767px) {
|
||||||
|
.textButton {
|
||||||
|
margin-top: var(--Space-x2);
|
||||||
|
}
|
||||||
|
}
|
||||||
@media screen and (min-width: 768px) {
|
@media screen and (min-width: 768px) {
|
||||||
.modalContent {
|
.modalContent {
|
||||||
padding: var(--Space-x1) var(--Space-x3) var(--Space-x3);
|
padding: var(--Space-x1) var(--Space-x3) var(--Space-x3);
|
||||||
width: 560px; /* From figma design */
|
width: 560px; /* From figma design */
|
||||||
}
|
}
|
||||||
|
|
||||||
.button {
|
.primaryButton {
|
||||||
padding: var(--Space-x15) var(--Space-x2) var(--Space-x15) var(--Space-x3);
|
padding: var(--Space-x15) var(--Space-x2) var(--Space-x15) var(--Space-x3);
|
||||||
}
|
}
|
||||||
|
.textButton {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,17 +8,21 @@ import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
|||||||
|
|
||||||
import styles from "./UsePoints.module.css"
|
import styles from "./UsePoints.module.css"
|
||||||
|
|
||||||
export function UsePointsButton({ variant, className, onPress }: ButtonProps) {
|
export function UsePointsButton({ variant, onPress }: ButtonProps) {
|
||||||
const intl = useIntl()
|
const intl = useIntl()
|
||||||
const isSmallScreen = useIsMobile()
|
const isSmallScreen = useIsMobile()
|
||||||
|
|
||||||
const buttonVariant =
|
const buttonVariant =
|
||||||
variant === "Text" && isSmallScreen ? "Secondary" : variant
|
variant === "Text" && isSmallScreen ? "Secondary" : variant
|
||||||
|
|
||||||
|
const buttonClassName = cx(
|
||||||
|
variant === "Text" ? styles.textButton : styles.primaryButton
|
||||||
|
)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
size="Medium"
|
size="Medium"
|
||||||
className={cx(styles.button, className)}
|
className={buttonClassName}
|
||||||
variant={buttonVariant}
|
variant={buttonVariant}
|
||||||
typography="Body/Paragraph/mdBold"
|
typography="Body/Paragraph/mdBold"
|
||||||
onPress={onPress}
|
onPress={onPress}
|
||||||
|
|||||||
@@ -85,11 +85,7 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: var(--Space-x2);
|
gap: var(--Space-x2);
|
||||||
}
|
}
|
||||||
@media screen and (max-width: 767px) {
|
|
||||||
.usePointsButton {
|
|
||||||
margin-top: var(--Space-x2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@media screen and (min-width: 768px) {
|
@media screen and (min-width: 768px) {
|
||||||
.content {
|
.content {
|
||||||
grid-template-columns: auto 1fr;
|
grid-template-columns: auto 1fr;
|
||||||
@@ -109,9 +105,6 @@
|
|||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
}
|
}
|
||||||
.usePointsButton {
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (min-width: 1367px) {
|
@media screen and (min-width: 1367px) {
|
||||||
|
|||||||
@@ -80,7 +80,6 @@ export default async function PointsToSpendCard({
|
|||||||
buttonVariant="Text"
|
buttonVariant="Text"
|
||||||
contentData={usePointsData}
|
contentData={usePointsData}
|
||||||
points={user.membership.currentPoints}
|
points={user.membership.currentPoints}
|
||||||
className={styles.usePointsButton}
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user