Skip to content

fix(text-styling): text-* typo in styling component's text #476

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions src/app/[countryCode]/(checkout)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ export default function CheckoutLayout({
data-testid="back-to-cart-link"
>
<ChevronDown className="rotate-90" size={16} />
<span className="mt-px hidden small:block txt-compact-plus text-ui-fg-subtle hover:text-ui-fg-base ">
<span className="mt-px hidden small:block text-compact-plus text-ui-fg-subtle hover:text-ui-fg-base ">
Back to shopping cart
</span>
<span className="mt-px block small:hidden txt-compact-plus text-ui-fg-subtle hover:text-ui-fg-base">
<span className="mt-px block small:hidden text-compact-plus text-ui-fg-subtle hover:text-ui-fg-base">
Back
</span>
</LocalizedClientLink>
<LocalizedClientLink
href="/"
className="txt-compact-xlarge-plus text-ui-fg-subtle hover:text-ui-fg-base uppercase"
className="text-compact-xlarge-plus text-ui-fg-subtle hover:text-ui-fg-base uppercase"
data-testid="store-link"
>
Medusa Store
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const EditAddress: React.FC<EditAddressProps> = ({
</Heading>
{address.company && (
<Text
className="txt-compact-small text-ui-fg-base"
className="text-compact-small text-ui-fg-base"
data-testid="address-company"
>
{address.company}
Expand Down
2 changes: 1 addition & 1 deletion src/modules/account/templates/account-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const AccountLayout: React.FC<AccountLayoutProps> = ({
<div className="flex flex-col small:flex-row items-end justify-between small:border-t border-gray-200 py-12 gap-8">
<div>
<h3 className="text-xl-semi mb-4">Got questions?</h3>
<span className="txt-medium">
<span className="text-medium">
You can find frequently asked questions and answers on our
customer service page.
</span>
Expand Down
2 changes: 1 addition & 1 deletion src/modules/cart/components/cart-item-select/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const CartItemSelect = forwardRef<HTMLSelectElement, NativeSelectProps>(
onFocus={() => innerRef.current?.focus()}
onBlur={() => innerRef.current?.blur()}
className={clx(
"relative flex items-center txt-compact-small border text-ui-fg-base group",
"relative flex items-center text-compact-small border text-ui-fg-base group",
className,
{
"text-ui-fg-subtle": isPlaceholder,
Expand Down
2 changes: 1 addition & 1 deletion src/modules/cart/components/item/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const Item = ({ item, type = "full", currencyCode }: ItemProps) => {

<Table.Cell className="text-left">
<Text
className="txt-medium-plus text-ui-fg-base"
className="text-medium-plus text-ui-fg-base"
data-testid="product-title"
>
{item.product_title}
Expand Down
4 changes: 2 additions & 2 deletions src/modules/cart/components/sign-in-prompt/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ const SignInPrompt = () => {
return (
<div className="bg-white flex items-center justify-between">
<div>
<Heading level="h2" className="txt-xlarge">
<Heading level="h2" className="text-xlarge">
Already have an account?
</Heading>
<Text className="txt-medium text-ui-fg-subtle mt-2">
<Text className="text-medium text-ui-fg-subtle mt-2">
Sign in for a better experience.
</Text>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/modules/cart/templates/items.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const ItemsTemplate = ({ cart }: ItemsTemplateProps) => {
</div>
<Table>
<Table.Header className="border-t-0">
<Table.Row className="text-ui-fg-subtle txt-medium-plus">
<Table.Row className="text-ui-fg-subtle text-medium-plus">
<Table.HeaderCell className="!pl-0">Item</Table.HeaderCell>
<Table.HeaderCell></Table.HeaderCell>
<Table.HeaderCell>Quantity</Table.HeaderCell>
Expand Down
28 changes: 14 additions & 14 deletions src/modules/checkout/components/addresses/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,22 +99,22 @@ const Addresses = ({
className="flex flex-col w-1/3"
data-testid="shipping-address-summary"
>
<Text className="txt-medium-plus text-ui-fg-base mb-1">
<Text className="text-medium-plus text-ui-fg-base mb-1">
Shipping Address
</Text>
<Text className="txt-medium text-ui-fg-subtle">
<Text className="text-medium text-ui-fg-subtle">
{cart.shipping_address.first_name}{" "}
{cart.shipping_address.last_name}
</Text>
<Text className="txt-medium text-ui-fg-subtle">
<Text className="text-medium text-ui-fg-subtle">
{cart.shipping_address.address_1}{" "}
{cart.shipping_address.address_2}
</Text>
<Text className="txt-medium text-ui-fg-subtle">
<Text className="text-medium text-ui-fg-subtle">
{cart.shipping_address.postal_code},{" "}
{cart.shipping_address.city}
</Text>
<Text className="txt-medium text-ui-fg-subtle">
<Text className="text-medium text-ui-fg-subtle">
{cart.shipping_address.country_code?.toUpperCase()}
</Text>
</div>
Expand All @@ -123,13 +123,13 @@ const Addresses = ({
className="flex flex-col w-1/3 "
data-testid="shipping-contact-summary"
>
<Text className="txt-medium-plus text-ui-fg-base mb-1">
<Text className="text-medium-plus text-ui-fg-base mb-1">
Contact
</Text>
<Text className="txt-medium text-ui-fg-subtle">
<Text className="text-medium text-ui-fg-subtle">
{cart.shipping_address.phone}
</Text>
<Text className="txt-medium text-ui-fg-subtle">
<Text className="text-medium text-ui-fg-subtle">
{cart.email}
</Text>
</div>
Expand All @@ -138,29 +138,29 @@ const Addresses = ({
className="flex flex-col w-1/3"
data-testid="billing-address-summary"
>
<Text className="txt-medium-plus text-ui-fg-base mb-1">
<Text className="text-medium-plus text-ui-fg-base mb-1">
Billing Address
</Text>

{sameAsBilling ? (
<Text className="txt-medium text-ui-fg-subtle">
<Text className="text-medium text-ui-fg-subtle">
Billing- and delivery address are the same.
</Text>
) : (
<>
<Text className="txt-medium text-ui-fg-subtle">
<Text className="text-medium text-ui-fg-subtle">
{cart.billing_address?.first_name}{" "}
{cart.billing_address?.last_name}
</Text>
<Text className="txt-medium text-ui-fg-subtle">
<Text className="text-medium text-ui-fg-subtle">
{cart.billing_address?.address_1}{" "}
{cart.billing_address?.address_2}
</Text>
<Text className="txt-medium text-ui-fg-subtle">
<Text className="text-medium text-ui-fg-subtle">
{cart.billing_address?.postal_code},{" "}
{cart.billing_address?.city}
</Text>
<Text className="txt-medium text-ui-fg-subtle">
<Text className="text-medium text-ui-fg-subtle">
{cart.billing_address?.country_code?.toUpperCase()}
</Text>
</>
Expand Down
8 changes: 4 additions & 4 deletions src/modules/checkout/components/discount-code/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ const DiscountCode: React.FC<DiscountCodeProps> = ({ cart }) => {

return (
<div className="w-full bg-white flex flex-col">
<div className="txt-medium">
<div className="text-medium">
<form action={(a) => addPromotionCode(a)} className="w-full mb-5">
<Label className="flex gap-x-1 my-2 items-center">
<button
onClick={() => setIsOpen(!isOpen)}
type="button"
className="txt-medium text-ui-fg-interactive hover:text-ui-fg-interactive-hover"
className="text-medium text-ui-fg-interactive hover:text-ui-fg-interactive-hover"
data-testid="add-discount-button"
>
Add Promotion Code(s)
Expand Down Expand Up @@ -100,7 +100,7 @@ const DiscountCode: React.FC<DiscountCodeProps> = ({ cart }) => {
{promotions.length > 0 && (
<div className="w-full flex items-center">
<div className="flex flex-col w-full">
<Heading className="txt-medium mb-2">
<Heading className="text-medium mb-2">
Promotion(s) applied:
</Heading>

Expand All @@ -111,7 +111,7 @@ const DiscountCode: React.FC<DiscountCodeProps> = ({ cart }) => {
className="flex items-center justify-between w-full max-w-full mb-2"
data-testid="discount-row"
>
<Text className="flex gap-x-1 items-baseline txt-small-plus w-4/5 pr-1">
<Text className="flex gap-x-1 items-baseline text-small-plus w-4/5 pr-1">
<span className="truncate" data-testid="discount-code">
<Badge
color={promotion.is_automatic ? "green" : "grey"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export const StripeCardContainer = ({
{selectedPaymentOptionId === paymentProviderId &&
(stripeReady ? (
<div className="my-4 transition-all duration-150 ease-in-out">
<Text className="txt-medium-plus text-ui-fg-base mb-1">
<Text className="text-medium-plus text-ui-fg-base mb-1">
Enter your card details:
</Text>
<CardElement
Expand Down
16 changes: 8 additions & 8 deletions src/modules/checkout/components/payment/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,11 @@ const Payment = ({

{paidByGiftcard && (
<div className="flex flex-col w-1/3">
<Text className="txt-medium-plus text-ui-fg-base mb-1">
<Text className="text-medium-plus text-ui-fg-base mb-1">
Payment method
</Text>
<Text
className="txt-medium text-ui-fg-subtle"
className="text-medium text-ui-fg-subtle"
data-testid="payment-method-summary"
>
Gift card
Expand Down Expand Up @@ -206,23 +206,23 @@ const Payment = ({
{cart && paymentReady && activeSession ? (
<div className="flex items-start gap-x-1 w-full">
<div className="flex flex-col w-1/3">
<Text className="txt-medium-plus text-ui-fg-base mb-1">
<Text className="text-medium-plus text-ui-fg-base mb-1">
Payment method
</Text>
<Text
className="txt-medium text-ui-fg-subtle"
className="text-medium text-ui-fg-subtle"
data-testid="payment-method-summary"
>
{paymentInfoMap[activeSession?.provider_id]?.title ||
activeSession?.provider_id}
</Text>
</div>
<div className="flex flex-col w-1/3">
<Text className="txt-medium-plus text-ui-fg-base mb-1">
<Text className="text-medium-plus text-ui-fg-base mb-1">
Payment details
</Text>
<div
className="flex gap-2 txt-medium text-ui-fg-subtle items-center"
className="flex gap-2 text-medium text-ui-fg-subtle items-center"
data-testid="payment-details-summary"
>
<Container className="flex items-center h-7 w-fit p-2 bg-ui-button-neutral-hover">
Expand All @@ -240,11 +240,11 @@ const Payment = ({
</div>
) : paidByGiftcard ? (
<div className="flex flex-col w-1/3">
<Text className="txt-medium-plus text-ui-fg-base mb-1">
<Text className="text-medium-plus text-ui-fg-base mb-1">
Payment method
</Text>
<Text
className="txt-medium text-ui-fg-subtle"
className="text-medium text-ui-fg-subtle"
data-testid="payment-method-summary"
>
Gift card
Expand Down
2 changes: 1 addition & 1 deletion src/modules/checkout/components/review/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const Review = ({ cart }: { cart: any }) => {
<>
<div className="flex items-start gap-x-1 w-full mb-6">
<div className="w-full">
<Text className="txt-medium-plus text-ui-fg-base mb-1">
<Text className="text-medium-plus text-ui-fg-base mb-1">
By clicking the Place Order button, you confirm that you have
read, understand and accept our Terms of Use, Terms of Sale and
Returns Policy and acknowledge that you have read Medusa
Expand Down
12 changes: 6 additions & 6 deletions src/modules/checkout/components/shipping/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,10 @@ const Shipping: React.FC<ShippingProps> = ({
<>
<div className="grid">
<div className="flex flex-col">
<span className="font-medium txt-medium text-ui-fg-base">
<span className="font-medium text-medium text-ui-fg-base">
Shipping method
</span>
<span className="mb-4 text-ui-fg-muted txt-medium">
<span className="mb-4 text-ui-fg-muted text-medium">
How would you like you order delivered
</span>
</div>
Expand Down Expand Up @@ -294,10 +294,10 @@ const Shipping: React.FC<ShippingProps> = ({
{showPickupOptions === PICKUP_OPTION_ON && (
<div className="grid">
<div className="flex flex-col">
<span className="font-medium txt-medium text-ui-fg-base">
<span className="font-medium text-medium text-ui-fg-base">
Store
</span>
<span className="mb-4 text-ui-fg-muted txt-medium">
<span className="mb-4 text-ui-fg-muted text-medium">
Choose a store near you
</span>
</div>
Expand Down Expand Up @@ -377,10 +377,10 @@ const Shipping: React.FC<ShippingProps> = ({
<div className="text-small-regular">
{cart && (cart.shipping_methods?.length ?? 0) > 0 && (
<div className="flex flex-col w-1/3">
<Text className="txt-medium-plus text-ui-fg-base mb-1">
<Text className="text-medium-plus text-ui-fg-base mb-1">
Method
</Text>
<Text className="txt-medium text-ui-fg-subtle">
<Text className="text-medium text-ui-fg-subtle">
{cart.shipping_methods?.at(-1)?.name}{" "}
{convertToLocale({
amount: cart.shipping_methods.at(-1)?.amount!,
Expand Down
6 changes: 3 additions & 3 deletions src/modules/common/components/cart-totals/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const CartTotals: React.FC<CartTotalsProps> = ({ totals }) => {

return (
<div>
<div className="flex flex-col gap-y-2 txt-medium text-ui-fg-subtle ">
<div className="flex flex-col gap-y-2 text-medium text-ui-fg-subtle ">
<div className="flex items-center justify-between">
<span className="flex gap-x-1 items-center">
Subtotal (excl. shipping and taxes)
Expand Down Expand Up @@ -78,10 +78,10 @@ const CartTotals: React.FC<CartTotalsProps> = ({ totals }) => {
)}
</div>
<div className="h-px w-full border-b border-gray-200 my-4" />
<div className="flex items-center justify-between text-ui-fg-base mb-2 txt-medium ">
<div className="flex items-center justify-between text-ui-fg-base mb-2 text-medium ">
<span>Total</span>
<span
className="txt-xlarge-plus"
className="text-xlarge-plus"
data-testid="cart-total"
data-value={total || 0}
>
Expand Down
2 changes: 1 addition & 1 deletion src/modules/common/components/checkbox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const CheckboxWithLabel: React.FC<CheckboxProps> = ({
/>
<Label
htmlFor="checkbox"
className="!transform-none !txt-medium"
className="!transform-none !text-medium"
size="large"
>
{label}
Expand Down
4 changes: 2 additions & 2 deletions src/modules/common/components/filter-radio-group/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const FilterRadioGroup = ({
}: FilterRadioGroupProps) => {
return (
<div className="flex gap-x-3 flex-col gap-y-3">
<Text className="txt-compact-small-plus text-ui-fg-muted">{title}</Text>
<Text className="text-compact-small-plus text-ui-fg-muted">{title}</Text>
<RadioGroup data-testid={dataTestId} onValueChange={handleChange}>
{items?.map((i) => (
<div
Expand All @@ -40,7 +40,7 @@ const FilterRadioGroup = ({
<Label
htmlFor={i.value}
className={clx(
"!txt-compact-small !transform-none text-ui-fg-subtle hover:cursor-pointer",
"!text-compact-small !transform-none text-ui-fg-subtle hover:cursor-pointer",
{
"text-ui-fg-base": i.value === value,
}
Expand Down
4 changes: 2 additions & 2 deletions src/modules/common/components/input/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(
return (
<div className="flex flex-col w-full">
{topLabel && (
<Label className="mb-2 txt-compact-medium-plus">{topLabel}</Label>
<Label className="mb-2 text-compact-medium-plus">{topLabel}</Label>
)}
<div className="flex relative z-0 w-full txt-compact-medium">
<div className="flex relative z-0 w-full text-compact-medium">
<input
type={inputType}
name={name}
Expand Down
2 changes: 1 addition & 1 deletion src/modules/common/components/line-item-options/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const LineItemOptions = ({
<Text
data-testid={dataTestid}
data-value={dataValue}
className="inline-block txt-medium text-ui-fg-subtle w-full overflow-hidden text-ellipsis"
className="inline-block text-medium text-ui-fg-subtle w-full overflow-hidden text-ellipsis"
>
Variant: {variant?.title}
</Text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default async function ProductRail({
return (
<div className="content-container py-12 small:py-24">
<div className="flex justify-between mb-8">
<Text className="txt-xlarge">{collection.title}</Text>
<Text className="text-xlarge">{collection.title}</Text>
<InteractiveLink href={`/collections/${collection.handle}`}>
View all
</InteractiveLink>
Expand Down
4 changes: 2 additions & 2 deletions src/modules/layout/components/country-select/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ const CountrySelect = ({ toggleState, regions }: CountrySelectProps) => {
}
>
<ListboxButton className="py-1 w-full">
<div className="txt-compact-small flex items-start gap-x-2">
<div className="text-compact-small flex items-start gap-x-2">
<span>Shipping to:</span>
{current && (
<span className="txt-compact-small flex items-center gap-x-2">
<span className="text-compact-small flex items-center gap-x-2">
{/* @ts-ignore */}
<ReactCountryFlag
svg
Expand Down
Loading