How to use the react-treat.useStyles function in react-treat

To help you get started, we’ve selected a few react-treat 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 seek-oss / treat / example / Demo / Demo.tsx View on Github external
export default () => {
  const [hide, setHide] = useState(false);

  const demo1Styles = useStyles(demo1Refs);
  const demo2 = useClassName(demo2Refs);
  const demo3 = useClassName(demo3Refs);

  return (
    <>
      <input checked="{hide}" type="checkbox"> setHide(!hide)} /&gt;
github seek-oss / braid-design-system / site / src / App / Code / Code.tsx View on Github external
const CodeButton = ({
  component = 'button',
  children,
  ...restProps
}: BoxProps) =&gt; {
  const styles = useStyles(styleRefs);

  return (
github seek-oss / braid-design-system / site / src / App / Code / Code.tsx View on Github external
export default ({ children }: CodeProps) => {
  const styles = useStyles(styleRefs);
  const { playroomUrl } = useConfig();

  const snippet = cleanSnippet(
    formatSnippet(
      typeof children === 'string'
        ? children
        : reactElementToJSXString(children, {
            useBooleanShorthandSyntax: false,
            showDefaultProps: false,
            showFunctions: false,
            filterProps: ['onChange', 'onBlur', 'onFocus'],
          }),
    ),
  );

  return (

react-treat

React library for integrating with treat

MIT
Latest version published 4 years ago

Package Health Score

51 / 100
Full package analysis

Popular react-treat functions