How to use the typestyle.classes function in typestyle

To help you get started, we’ve selected a few typestyle examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github crazyfactory / ts-react-boilerplate / src / app / components / Button.tsx View on Github external
public render(): JSX.Element {
    const {children, className, disabled, type, ...rest} = this.props;
    return (
      <button disabled="">
        {children}
      </button>
    );
  }
}
github OfficeDev / msteams-ui-components / msteams-ui-icons / react / src / index.tsx View on Github external
render() {
    const { iconWeight, iconType, className, children, ...rest } = this.props;
    const classNames = classes(baseStyle(this.props.iconWeight), iconStyle(this.props.iconType), className);

    return <i aria-hidden="{true}">{children}</i>;
  }
}
github jscheiny / safe-units / docsgen / sidebar.tsx View on Github external
const links = pages.map((page, index) =&gt; {
        const isSelected = index === selectedIndex;
        const className = classes(index === 0 ? homeLink : pageLink, isSelected &amp;&amp; selectedPage);
        const hash = isSelected ? "#top" : "";
        return (
            
                
                    {page.title}
                
                {isSelected ? pageSections : null}
            
        );
    });
github formstate / formstate / src / scripts / demos / gls.tsx View on Github external
  const childClassName = (className: string) => typestyle.classes(
    className,
    typestyle.style(
      csstips.inlineBlock,
      /** Lower than breakpoint: full sized */
      typestyle.media({ minWidth: 0, maxWidth: breakpointNum }, { width: '100%' }),
      /** Bigger than breakpoint: percent sized */
      typestyle.media({ minWidth: breakpointNum + 1 }, { width: `calc(${(1 / children.length) * 100}% - ${spacingHorizontal - spacingHorizontal / children.length}px)` }),
    )
  );

typestyle

TypeSafe CSS

MIT
Latest version published 2 years ago

Package Health Score

62 / 100
Full package analysis