How to use react-treat - 5 common examples

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 (
github seek-oss / treat / example / Demo / Demo.tsx View on Github external
export default () =&gt; {
  const [hide, setHide] = useState(false);

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

  return (
    &lt;&gt;
      <input checked="{hide}" type="checkbox"> setHide(!hide)} /&gt;
github seek-oss / treat / example / Demo / Demo.tsx View on Github external
export default () =&gt; {
  const [hide, setHide] = useState(false);

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

  return (
    &lt;&gt;
      <input checked="{hide}" type="checkbox"> setHide(!hide)} /&gt;

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