Trails Packages
    Preparing search index...

    Function useCommonComponentProps

    • A helper hook that computes react properties for the topmost container in a public react component.

      Example:

      function MyComponent(props) {
      const { containerProps } = useCommonComponentProps("my-component", props);
      // automatically applies css classes and testid
      return <Box {...containerProps}>Content</Box>;
      }

      Parameters

      Returns { containerProps: HTMLAttributes<HTMLElement> }