I edited answer to show mixin 5.2.3 code
Bootstrap v5.2.3 btn-mixin-sass-compiled-theme
$theme-btn-bg-primary: $blue-800;
$theme-btn-bg-secondary: $indigo-400;
$theme-btn-bg-success: $purple-700;
$theme-btn-bg-info: $pink-500;
$theme-btn-bg-warning: $red-300;
$theme-btn-bg-danger: $orange-500;
$theme-btn-bg-light: $gray-400;
$theme-btn-bg-dark: $gray-700;
$theme-btn-bg-link: $green-500;
$theme-btn-text: $black;
$theme-btn-disabled-text: $white;
.btn-primary {
@include button-variant($theme-btn-bg-primary, $theme-btn-bg-primary, color-contrast($theme-btn-bg-primary), shade-color($theme-btn-bg-primary, 0%));
}
.btn-secondary {
@include button-variant($theme-btn-bg-secondary, $theme-btn-bg-secondary, color-contrast($theme-btn-bg-secondary), shade-color($theme-btn-bg-secondary, 0%));
}
.btn-success {
@include button-variant($theme-btn-bg-success, $theme-btn-bg-success, color-contrast($theme-btn-bg-success), shade-color($theme-btn-bg-success, 0%));
}
.btn-info {
@include button-variant($theme-btn-bg-info, $theme-btn-bg-info, color-contrast($theme-btn-bg-info), shade-color($theme-btn-bg-info, 0%));
}
//
.btn-warning {
@include button-variant( $theme-btn-bg-warning, $theme-btn-bg-warning, color-contrast($theme-btn-text), shade-color($theme-btn-bg-warning, 0%), shade-color($theme-btn-bg-warning, 0%), color-contrast($theme-btn-text), shade-color($theme-btn-bg-warning, 10%), shade-color($theme-btn-bg-warning, 10%), color-contrast($theme-btn-bg-warning), $theme-btn-bg-warning, $theme-btn-bg-warning);--bs-btn-active-color:#fff;--bs-btn-disabled-color:#fff;
}
//
.btn-danger {
@include button-variant($theme-btn-bg-danger, $theme-btn-bg-danger, color-contrast($theme-btn-text), shade-color($theme-btn-bg-danger, 0%), shade-color($theme-btn-bg-danger, 0%), color-contrast($theme-btn-text), shade-color($theme-btn-bg-danger, 10%), shade-color($theme-btn-bg-danger, 10%), color-contrast($theme-btn-bg-danger), $theme-btn-bg-danger, $theme-btn-bg-danger);--bs-btn-active-color:#fff;--bs-btn-disabled-color:#fff;
}
.btn-light {
@include button-variant($theme-btn-bg-light, $theme-btn-bg-light, color-contrast($theme-btn-text), shade-color($theme-btn-bg-light, 0%), shade-color($theme-btn-bg-light, 0%), color-contrast($theme-btn-text), shade-color($theme-btn-bg-light, 10%), shade-color($theme-btn-bg-light, 10%), color-contrast($theme-btn-bg-light), $theme-btn-bg-light, $theme-btn-bg-light);--bs-btn-active-color:#fff;--bs-btn-disabled-color:#fff;
}
.btn-dark {
@include button-variant($theme-btn-bg-dark, $theme-btn-bg-dark, color-contrast($theme-btn-bg-dark), shade-color($theme-btn-bg-dark, 0%));
}
.btn-link {
@include button-variant($theme-btn-bg-link, $theme-btn-bg-link, color-contrast($theme-btn-bg-link), shade-color($theme-btn-bg-link, 0%));
}