Files
mtdb_movie/common/resources/client/background-selector/css-props-from-bg-config.ts
maher 703f50a09d
Some checks failed
Build / run (push) Has been cancelled
first commit
2025-10-29 11:42:25 +01:00

21 lines
614 B
TypeScript
Executable File

import {
BackgroundSelectorConfig,
EditableBackgroundProps,
} from './background-selector-config';
export function cssPropsFromBgConfig(
bgConfig?: Partial<BackgroundSelectorConfig>,
): EditableBackgroundProps | undefined {
if (bgConfig) {
return {
backgroundImage: bgConfig.backgroundImage,
backgroundColor: bgConfig.backgroundColor,
backgroundAttachment: bgConfig.backgroundAttachment,
backgroundSize: bgConfig.backgroundSize,
backgroundRepeat: bgConfig.backgroundRepeat,
backgroundPosition: bgConfig.backgroundPosition,
color: bgConfig.color,
};
}
}