# All files menuItemInputToggleStyles.ts

84.61% Statements 66/78
100% Branches 2/2
50% Functions 2/4
84.61% Lines 66/78

Press n or j to go to the next uncovered block, b, p or k for the previous block.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    791x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    24x
    24x
    24x
    24x
    24x
    24x
    24x
    24x
    24x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x

    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x

    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    1x
    24x
    24x
    24x
    24x
    24x
    24x
     import { cnb } from "cnbuilder";
    import { bem } from "../utils/bem.js";

    const styles = bem("rmd-menu-item-input-toggle");

    /** @remarks \@since 6.0.0 */
    export interface MenuItemInputToggleClassNameOptions {
      className?: string;
      type: "radio" | "checkbox" | "switch";
    }

    /**
     * @remarks \@since 6.0.0
     */
    export function menuItemInputToggle(
      options: MenuItemInputToggleClassNameOptions
    ): string {
      const { className, type } = options;
      return cnb(
        `rmd-${type}-menu-item`,
        styles({ switch: type === "switch" }),
        className
      );
    }

    /**
     * @remarks \@since 6.0.0
     */
    export interface MenuItemInputToggleTrackClassNameOptions {
      className?: string;
    }

    /**
     * @remarks \@since 6.0.0
     */
    export function menuItemInputToggleTrack(
      options: MenuItemInputToggleTrackClassNameOptions = {}
    ): string {
      const { className } = options;

      return cnb(styles("track"), className);
    }

    /**
     * @remarks \@since 6.0.0
     */
    export interface MenuItemInputToggleBallClassNameOptions {
      className?: string;
    }

    /**
     * @remarks \@since 6.0.0
     */
    export function menuItemInputToggleBall(
      options: MenuItemInputToggleBallClassNameOptions = {}
    ): string {
      const { className } = options;

      return cnb(styles("ball"), className);
    }

    /**
     * @remarks \@since 6.0.0
     */
    export interface MenuItemInputToggleIconClassNameOptions {
      className?: string;
    }

    /**
     * @remarks \@since 6.0.0
     */
    export function menuItemInputToggleIcon(
      options: MenuItemInputToggleIconClassNameOptions = {}
    ): string {
      const { className } = options;

      return cnb(styles("icon"), className);
    }