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 {
|
||||
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) {
|
||||
.modalContent {
|
||||
padding: var(--Space-x1) var(--Space-x3) var(--Space-x3);
|
||||
width: 560px; /* From figma design */
|
||||
}
|
||||
|
||||
.button {
|
||||
.primaryButton {
|
||||
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"
|
||||
|
||||
export function UsePointsButton({ variant, className, onPress }: ButtonProps) {
|
||||
export function UsePointsButton({ variant, onPress }: ButtonProps) {
|
||||
const intl = useIntl()
|
||||
const isSmallScreen = useIsMobile()
|
||||
|
||||
const buttonVariant =
|
||||
variant === "Text" && isSmallScreen ? "Secondary" : variant
|
||||
|
||||
const buttonClassName = cx(
|
||||
variant === "Text" ? styles.textButton : styles.primaryButton
|
||||
)
|
||||
|
||||
return (
|
||||
<Button
|
||||
size="Medium"
|
||||
className={cx(styles.button, className)}
|
||||
className={buttonClassName}
|
||||
variant={buttonVariant}
|
||||
typography="Body/Paragraph/mdBold"
|
||||
onPress={onPress}
|
||||
|
||||
@@ -85,11 +85,7 @@
|
||||
flex-direction: column;
|
||||
gap: var(--Space-x2);
|
||||
}
|
||||
@media screen and (max-width: 767px) {
|
||||
.usePointsButton {
|
||||
margin-top: var(--Space-x2);
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 768px) {
|
||||
.content {
|
||||
grid-template-columns: auto 1fr;
|
||||
@@ -109,9 +105,6 @@
|
||||
border-radius: 0;
|
||||
background: transparent;
|
||||
}
|
||||
.usePointsButton {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1367px) {
|
||||
|
||||
@@ -80,7 +80,6 @@ export default async function PointsToSpendCard({
|
||||
buttonVariant="Text"
|
||||
contentData={usePointsData}
|
||||
points={user.membership.currentPoints}
|
||||
className={styles.usePointsButton}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user