All files / ui/src/2-inline-block/FlexibleInput util.ts

85.71% Statements 6/7
50% Branches 1/2
100% Functions 1/1
100% Lines 4/4

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

1 2 3 4 5 61x 9x 9x 72x    
export const copyStyles = (from: HTMLElement, to: HTMLElement, which: string[]): void => {
  const styles = window.getComputedStyle(from);
  Iif (!styles) return;
  for (const property of which) (to.style as any)[property] = (styles as any)[property];
};