update
This commit is contained in:
@@ -4,26 +4,25 @@ import type { IconName } from "@/ui/Widgets/Icon/icons";
|
||||
export const TypeClasses = [ "Ghost", "Accent" ] as const;
|
||||
|
||||
export const StickingTypeIconMap = {
|
||||
none: null,
|
||||
lf: 'lf',
|
||||
lh: 'lh',
|
||||
rf: 'rf',
|
||||
rh: 'rh',
|
||||
} as const satisfies Readonly<Record<TrackUnitStickingType, IconName | null>>;
|
||||
} as const satisfies Record<TrackUnitStickingType, IconName | null>;
|
||||
|
||||
export const TrackUnitTypeClassMap = {
|
||||
"Normal": [],
|
||||
"GhostNote": ["Ghost"],
|
||||
"Accent": ["Accent"],
|
||||
"GhostNoteAccent": ["Ghost", "Accent"],
|
||||
} as const satisfies Readonly<Record<TrackUnitType, Readonly<string[]>>>;
|
||||
} as const satisfies Record<TrackUnitType, Readonly<string[]>>;
|
||||
|
||||
export function getClasses(options: { on: boolean, stickingType: TrackUnitStickingType, type: TrackUnitType, highlightable?: boolean }) {
|
||||
export function getClasses(options: { on: boolean, stickingType: TrackUnitStickingType | null, type: TrackUnitType, highlightable?: boolean }) {
|
||||
const classes = ["track-unit"];
|
||||
if (options.on) {
|
||||
classes.push("on");
|
||||
}
|
||||
if (StickingTypeIconMap[options.stickingType]) {
|
||||
if (options.stickingType && StickingTypeIconMap[options.stickingType]) {
|
||||
classes.push("icon-visible");
|
||||
}
|
||||
if (options.type) {
|
||||
|
||||
Reference in New Issue
Block a user