How to use the @axa-fr/react-toolkit-core.ClassManager.getComponentClassName function in @axa-fr/react-toolkit-core

To help you get started, we’ve selected a few @axa-fr/react-toolkit-core 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 AxaGuilDEv / react-toolkit / packages / tabs / src / TabsStateless.js View on Github external
const TabsStateless = ({
  activeIndex,
  className,
  classModifier,
  children,
  onChange,
}) => {
  const componentClassName = ClassManager.getComponentClassName(
    className,
    classModifier,
    defaultClassName
  );
  return (
    <div>
      <ul>
        {React.Children.map(children, (tab, index) =&gt;
          React.cloneElement(tab, {
            active: activeIndex === index,
            onChange,
            role: 'TITLE',
            // index as a key is ok here, no better candidate
            key: index, // eslint-disable-line
            index,
          })</ul></div>
github AxaGuilDEv / react-toolkit / packages / tabs / src / TabsStateless.tsx View on Github external
const TabsStateless: React.SFC = ({
  activeIndex,
  className,
  classModifier,
  children,
  onChange,
}) =&gt; {
  const componentClassName = ClassManager.getComponentClassName(
    className,
    classModifier,
    defaultClassName
  );
  return (
    <div>
      <ul>
        {children.map((item, index) =&gt; (
          <title id="{`${index}`}">
            {item.props.title}
          </title></ul></div>
github AxaGuilDEv / react-toolkit / packages / table / src / Tr.js View on Github external
const Tr = props =&gt; {
  const { children, id, className, classModifier, ...otherProps } = props;
  const componentClassName = ClassManager.getComponentClassName(
    className,
    classModifier,
    defaultClassName
  );
  return (
    
      {children}
    
  );
};
github AxaGuilDEv / react-toolkit / packages / collapse / src / CollapseCardBase.js View on Github external
render() {
    const { className, classModifier, collapse } = this.props;

    let newClassModifier = collapse ? 'open' : '';
    newClassModifier = classModifier
      ? `${newClassModifier} ${classModifier}`
      : `${newClassModifier}`;

    const componentClassName = ClassManager.getComponentClassName(
      className,
      newClassModifier,
      defaultClassName
    );

    return <div>{this.renderChildren()}</div>;
  }
}
github AxaGuilDEv / react-toolkit / packages / table / src / Body.js View on Github external
const Body = props =&gt; {
  const { children, className, classModifier } = props;
  const componentClassName = ClassManager.getComponentClassName(
    className,
    classModifier,
    defaultClassName
  );
  return {children};
};
github AxaGuilDEv / react-toolkit / packages / Form / Input / file / src / FileTable.js View on Github external
const FileTable = ({
  errors,
  values,
  className,
  classModifier,
  disabled,
  onClick,
}) =&gt; {
  const componentClassName = ClassManager.getComponentClassName(
    className,
    classModifier,
    defaultClassName
  );
  return (
    <div>
      
      {values &amp;&amp; values.length &gt; 0 &amp;&amp; (
        <ul>
          {values.map(({ file, id }) =&gt; (
            </ul></div>
github AxaGuilDEv / react-toolkit / packages / Layout / header / src / NavBar / NavBarBase.js View on Github external
const NavBarBase = ({
  isVisible,
  onClick,
  id,
  toggleMenuId,
  isMenuFocused,
  className,
  classModifier,
  handleKeys,
  onFocus,
  onBlur,
  children,
}) =&gt; {
  const componentClassName = ClassManager.getComponentClassName(
    className,
    classModifier,
    defaultClassName
  );

  return (
    <div>
      
        <button id="{toggleMenuId}" type="button">
      
      </button></div>
github AxaGuilDEv / react-toolkit / packages / Layout / header / src / Name / Name.js View on Github external
render() {
    const { title, subtitle, img, alt, className, classModifier } = this.props;
    const componentClassName = ClassManager.getComponentClassName(
      className,
      classModifier,
      defaultClassName
    );
    return (
      <div>
        <a href="/">
          <img alt="{alt}" src="{img}">
        </a>
        <h2>
          {title}
          <small>{subtitle}</small>
        </h2>
      </div>
    );
  }
github AxaGuilDEv / react-toolkit / packages / tabs / src / Tabs.Title.js View on Github external
const Title = props =&gt; {
  const { active, className, classModifier } = props;
  const componentClassName = ClassManager.getComponentClassName(
    className,
    classModifier,
    defaultClassName
  );
  return (
    <li>
      <button type="button">
        TEST
      </button>
    </li>
  );
};
github AxaGuilDEv / react-toolkit / packages / tabs / src / Tab.js View on Github external
render() {
    const {
      role,
      active,
      disabled,
      children,
      title,
      className,
      classModifier,
    } = this.props;
    const componentClassName = ClassManager.getComponentClassName(
      className,
      classModifier,
      defaultClassName
    );
    switch (role) {
      case 'TITLE':
        return (
          <li>
            <button type="button"></button></li>