How do I reuse the SCSS mixins from another style file to work with my classes and style them according to their resolutions?

I have a type.scss file that I need to use to reference various stylings for the fonts.

// type.scss

@use 'queries' as *;

$font-rubik: 'Rubik', sans-serif;
$font-inter: 'Inter', sans-serif;

// Define typography for desktop
$desktop: (
        h1: (font: $font-rubik, size: 64px, weight: bold),
        h2: (font: $font-rubik, size: 48px, weight: bold),
        h3: (font: $font-rubik, size: 40px, weight: bold),
        h4: (font: $font-rubik, size: 32px, weight: bold),
        p-large: (font: $font-inter, size: 24px, weight: semibold),
        p-medium: (font: $font-inter, size: 24px, weight: regular),
        button: (font: $font-rubik, size: 18px, weight: semibold)
);

// Define typography for tablet
$tablet: (
        h1: (font: $font-rubik, size: 52px, weight: bold),
        h2: (font: $font-rubik, size: 32px, weight: bold),
        h3: (font: $font-rubik, size: 24px, weight: bold),
        h4: (font: $font-rubik, size: 18px, weight: bold),
        p-large: (font: $font-inter, size: 14px, weight: semibold),
        p-medium: (font: $font-inter, size: 12px, weight: regular),
        button: (font: $font-rubik, size: 12px, weight: semibold)
);

// Define typography for mobile
$mobile: (
        h1: (font: $font-rubik, size: 32px, weight: bold),
        h2: (font: $font-rubik, size: 24px, weight: bold),
        h3: (font: $font-rubik, size: 18px, weight: bold),
        h4: (font: $font-rubik, size: 14px, weight: bold),
        p-large: (font: $font-inter, size: 12px, weight: semibold),
        p-medium: (font: $font-inter, size: 12px, weight: regular),
        button: (font: $font-rubik, size: 12px, weight: semibold)
);

// Mixin to apply responsive typography
@mixin typography($device) {
    h1 { font-family: map-get(map-get($device, h1), font); font-size: map-get(map-get($device, h1), size); font-weight: map-get(map-get($device, h1), weight); }
    h2 { font-family: map-get(map-get($device, h2), font); font-size: map-get(map-get($device, h2), size); font-weight: map-get(map-get($device, h2), weight); }
    h3 { font-family: map-get(map-get($device, h3), font); font-size: map-get(map-get($device, h3), size); font-weight: map-get(map-get($device, h3), weight); }
    h4 { font-family: map-get(map-get($device, h4), font); font-size: map-get(map-get($device, h4), size); font-weight: map-get(map-get($device, h4), weight); }
    p.large { font-family: map-get(map-get($device, p-large), font); font-size: map-get(map-get($device, p-large), size); font-weight: map-get(map-get($device, p-large), weight); }
    p.medium { font-family: map-get(map-get($device, p-medium), font); font-size: map-get(map-get($device, p-medium), size); font-weight: map-get(map-get($device, p-medium), weight); }
    button { font-family: map-get(map-get($device, button), font); font-size: map-get(map-get($device, button), size); font-weight: map-get(map-get($device, button), weight); } 
}

Media queries for responsive design
body {
  @include typography($desktop); // Default styles for desktop
}

// Tablet Styles
@media (max-width: 992px) and (min-width: 769px) { // Target tablets between these widths
  body {
    @include typography($tablet);
  }
}

// Mobile Styles
@media (max-width: 768px) { // Target mobile devices up to 768px
  body {
    @include typography($mobile);
  }
}

I’ve imported this into another scss file via @use '../../css/type.scss' as *; and am trying to include the typography into a few of the classes, for example:

// include.module.scss

.searchTitle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  color: var(--main-color, #154058);
  align-self: stretch;
  text-align: center;
  font-family: 'Rubik'; // all the hardcoded font stuff is what I'm trying to replace
  font-size: 24px;
  font-style: normal;
  font-weight: 700;
  line-height: 150%; /* 36px */
}

This class styles a <p> tag <p className={classes.searchTitle}>Find education materials</p> and the idea is that including the mixin typographies would size and style the <p> tag accordingly based on the resolution. So I tried it but none of the styles applied.

I attempted to add a $class-name variable into the mixin too but that kept resulting in an error where I was missing an argument.

// type.scss

@mixin typography($device, $class-name) {
  .#{$class-name} {
    h1 { font-family: map-get(map-get($device, h1), font); font-size: map-get(map-get($device, h1), size); font-weight: map-get(map-get($device, h1), weight); }
    h2 { font-family: map-get(map-get($device, h2), font); font-size: map-get(map-get($device, h2), size); font-weight: map-get(map-get($device, h2), weight); }
    h3 { font-family: map-get(map-get($device, h3), font); font-size: map-get(map-get($device, h3), size); font-weight: map-get(map-get($device, h3), weight); }
    h4 { font-family: map-get(map-get($device, h4), font); font-size: map-get(map-get($device, h4), size); font-weight: map-get(map-get($device, h4), weight); }
    p.large { font-family: map-get(map-get($device, p-large), font); font-size: map-get(map-get($device, p-large), size); font-weight: map-get(map-get($device, p-large), weight); }
    p.medium { font-family: map-get(map-get($device, p-medium), font); font-size: map-get(map-get($device, p-medium), size); font-weight: map-get(map-get($device, p-medium), weight); }
    button { font-family: map-get(map-get($device, button), font); font-size: map-get(map-get($device, button), size); font-weight: map-get(map-get($device, button), weight); } 
  }
}
// include.module.scss

  @include typography($desktop, 'searchTitle');
  
  @media (max-width: 992px) and (min-width: 769px) { 
    @include typography($tablet, 'searchTitle');
  }

  @media (max-width: 768px) {
    @include typography($mobile, 'searchTitle');
  }  

I’m kind of stuck here and I’m not sure how to fix the styling or actually have it take effect:

[sass] Missing argument $class-name.
    ╷
40  │ @mixin typography($device, $class-name) {
    │        ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ declaration
... │
54  │   @include typography($desktop); // Default styles for desktop
    │   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invocation
    ╵
  src/css/type.scss 54:3                typography()
  src/css/type.scss 54:3                @use
  src/pages/Home/index.module.scss 1:1  root stylesheet

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật