mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 03:12:29 +00:00
Replaces hard-coded pixel values with relative rem units across UI components to improve typography responsiveness and maintainability. Co-authored-by: Hristo Terezov <hristo@jitsi.org>
25 lines
588 B
TypeScript
25 lines
588 B
TypeScript
import { StyleType } from './functions.any';
|
|
|
|
export * from './functions.any';
|
|
|
|
/**
|
|
* Fixes the style prop that is passed to a platform generic component based on platform specific
|
|
* format requirements.
|
|
*
|
|
* @param {StyleType} style - The passed style prop to the component.
|
|
* @returns {StyleType}
|
|
*/
|
|
export function getFixedPlatformStyle(style?: StyleType | StyleType[]) {
|
|
if (Array.isArray(style)) {
|
|
const _style = {};
|
|
|
|
for (const component of style) {
|
|
Object.assign(_style, component);
|
|
}
|
|
|
|
return _style;
|
|
}
|
|
|
|
return style;
|
|
}
|