Skip to content

Instantly share code, notes, and snippets.

View DexterHuang's full-sized avatar

DexterHuang DexterHuang

  • Accenture
  • Singapore
View GitHub Profile
import { CSSProperties } from "react";
export class ResponsiveHandler {
static getStyle(dis: any): CSSProperties {
const { xs, sm, md, lg, style } = dis.props;
const { width } = dis.state;
if (width < 767 && xs) {
return { ...style, ...xs };
}