fix: Added fullWidth property on button components to set them as full width
Approved-by: Matilda Landström
This commit is contained in:
@@ -37,6 +37,7 @@ export default async function ActivitiesSidePeek({
|
|||||||
color="Primary"
|
color="Primary"
|
||||||
size="Medium"
|
size="Medium"
|
||||||
typography="Body/Paragraph/mdBold"
|
typography="Body/Paragraph/mdBold"
|
||||||
|
fullWidth
|
||||||
>
|
>
|
||||||
{sidepeekCTA}
|
{sidepeekCTA}
|
||||||
</ButtonLink>
|
</ButtonLink>
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ export default async function MeetingsAndConferencesSidePeek({
|
|||||||
size="Medium"
|
size="Medium"
|
||||||
href={meetingPageHref}
|
href={meetingPageHref}
|
||||||
typography="Body/Paragraph/mdBold"
|
typography="Body/Paragraph/mdBold"
|
||||||
|
fullWidth
|
||||||
>
|
>
|
||||||
{intl.formatMessage({
|
{intl.formatMessage({
|
||||||
id: "common.readMore",
|
id: "common.readMore",
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ export function RestaurantBarItemLinks({
|
|||||||
href={bookTableUrl}
|
href={bookTableUrl}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
onClick={() => trackClick("book a table", { restaurantName })}
|
onClick={() => trackClick("book a table", { restaurantName })}
|
||||||
|
fullWidth
|
||||||
>
|
>
|
||||||
{showDetailsLink
|
{showDetailsLink
|
||||||
? intl.formatMessage({
|
? intl.formatMessage({
|
||||||
@@ -52,6 +53,7 @@ export function RestaurantBarItemLinks({
|
|||||||
size="Medium"
|
size="Medium"
|
||||||
typography="Body/Paragraph/mdBold"
|
typography="Body/Paragraph/mdBold"
|
||||||
href={restaurantPageHref}
|
href={restaurantPageHref}
|
||||||
|
fullWidth
|
||||||
>
|
>
|
||||||
{intl.formatMessage(
|
{intl.formatMessage(
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ export default function PricesAndAvailabilityButton({
|
|||||||
return (
|
return (
|
||||||
<ButtonLink
|
<ButtonLink
|
||||||
href={selectRateURL}
|
href={selectRateURL}
|
||||||
|
fullWidth
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
trackPricesAndAvailabilityClick(
|
trackPricesAndAvailabilityClick(
|
||||||
name,
|
name,
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ export default async function WellnessAndExerciseSidePeek({
|
|||||||
variant="Tertiary"
|
variant="Tertiary"
|
||||||
color="Primary"
|
color="Primary"
|
||||||
typography="Body/Paragraph/mdBold"
|
typography="Body/Paragraph/mdBold"
|
||||||
|
fullWidth
|
||||||
>
|
>
|
||||||
{spaPage.buttonCTA}
|
{spaPage.buttonCTA}
|
||||||
</ButtonLink>
|
</ButtonLink>
|
||||||
@@ -61,6 +62,7 @@ export default async function WellnessAndExerciseSidePeek({
|
|||||||
color="Primary"
|
color="Primary"
|
||||||
variant="Secondary"
|
variant="Secondary"
|
||||||
typography="Body/Paragraph/mdBold"
|
typography="Body/Paragraph/mdBold"
|
||||||
|
fullWidth
|
||||||
>
|
>
|
||||||
{intl.formatMessage({
|
{intl.formatMessage({
|
||||||
id: "sidepeek.wellness.showGymAndWellness",
|
id: "sidepeek.wellness.showGymAndWellness",
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ export function Button({
|
|||||||
color,
|
color,
|
||||||
size,
|
size,
|
||||||
wrapping,
|
wrapping,
|
||||||
|
fullWidth,
|
||||||
typography,
|
typography,
|
||||||
className,
|
className,
|
||||||
children,
|
children,
|
||||||
@@ -21,6 +21,7 @@ export function Button({
|
|||||||
size,
|
size,
|
||||||
wrapping,
|
wrapping,
|
||||||
typography,
|
typography,
|
||||||
|
fullWidth,
|
||||||
className,
|
className,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,10 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
gap: var(--Space-x05);
|
gap: var(--Space-x05);
|
||||||
|
|
||||||
|
&.full-width {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
&[data-disabled] {
|
&[data-disabled] {
|
||||||
cursor: unset;
|
cursor: unset;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,12 +30,17 @@ export const config = {
|
|||||||
true: undefined,
|
true: undefined,
|
||||||
false: styles['no-wrapping'],
|
false: styles['no-wrapping'],
|
||||||
},
|
},
|
||||||
|
fullWidth: {
|
||||||
|
true: styles['full-width'],
|
||||||
|
false: undefined,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
defaultVariants: {
|
defaultVariants: {
|
||||||
variant: 'Primary',
|
variant: 'Primary',
|
||||||
color: 'Primary',
|
color: 'Primary',
|
||||||
size: 'Large',
|
size: 'Large',
|
||||||
wrapping: true,
|
wrapping: true,
|
||||||
|
fullWidth: false,
|
||||||
},
|
},
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,8 @@ import Link from 'next/link'
|
|||||||
import { useIntl } from 'react-intl'
|
import { useIntl } from 'react-intl'
|
||||||
|
|
||||||
export interface ButtonLinkProps
|
export interface ButtonLinkProps
|
||||||
extends Omit<ComponentProps<typeof Link>, 'color'>,
|
extends
|
||||||
|
Omit<ComponentProps<typeof Link>, 'color'>,
|
||||||
VariantProps<typeof variants> {}
|
VariantProps<typeof variants> {}
|
||||||
|
|
||||||
export default function ButtonLink({
|
export default function ButtonLink({
|
||||||
@@ -18,6 +19,7 @@ export default function ButtonLink({
|
|||||||
size,
|
size,
|
||||||
typography,
|
typography,
|
||||||
wrapping,
|
wrapping,
|
||||||
|
fullWidth,
|
||||||
className,
|
className,
|
||||||
href,
|
href,
|
||||||
target,
|
target,
|
||||||
@@ -29,6 +31,7 @@ export default function ButtonLink({
|
|||||||
size,
|
size,
|
||||||
wrapping,
|
wrapping,
|
||||||
typography,
|
typography,
|
||||||
|
fullWidth,
|
||||||
className,
|
className,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,8 @@ import { cx, type VariantProps } from 'class-variance-authority'
|
|||||||
import type { HTMLAttributes } from 'react'
|
import type { HTMLAttributes } from 'react'
|
||||||
|
|
||||||
interface FakeButtonProps
|
interface FakeButtonProps
|
||||||
extends Omit<HTMLAttributes<HTMLSpanElement>, 'color'>,
|
extends
|
||||||
|
Omit<HTMLAttributes<HTMLSpanElement>, 'color'>,
|
||||||
VariantProps<typeof variants> {
|
VariantProps<typeof variants> {
|
||||||
isDisabled?: boolean
|
isDisabled?: boolean
|
||||||
}
|
}
|
||||||
@@ -16,6 +17,7 @@ export function FakeButton({
|
|||||||
color,
|
color,
|
||||||
size,
|
size,
|
||||||
typography,
|
typography,
|
||||||
|
fullWidth,
|
||||||
children,
|
children,
|
||||||
className,
|
className,
|
||||||
isHovered,
|
isHovered,
|
||||||
@@ -27,6 +29,7 @@ export function FakeButton({
|
|||||||
size,
|
size,
|
||||||
variant,
|
variant,
|
||||||
typography,
|
typography,
|
||||||
|
fullWidth,
|
||||||
isHovered,
|
isHovered,
|
||||||
className,
|
className,
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user