Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 4999 | Rev 6471 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 4999 Rev 5266
Línea 1... Línea 1...
1
/* eslint-disable react/prop-types */
1
/* eslint-disable react/prop-types */
2
import React from 'react'
2
import React from 'react'
Línea 3... Línea 3...
3
 
3
 
4
const ListItemDropdown = ({ options = [], isShow }) => {
4
const ListItemDropdown = ({ options = [], isShow }) => {
5
    if (!options.length) return null
5
  if (!options.length) return null
6
    return (
6
  return (
7
        <nav className={`nav__options-dropdown ${isShow && 'show'}`}>
7
        <nav className={`nav__options-dropdown ${isShow && 'show'}`}>
8
            <ul>{options.map((linkOption, index) =>
8
            <ul>{options.map((linkOption, index) =>
9
                <li key={index}>
9
                <li key={index}>
10
                    {linkOption.childs?.length
10
                    {linkOption.childs?.length
11
                        ? <a href='/' onClick={(e) => e.preventDefault()}>{linkOption.label}</a>
11
                      ? <a href='/' onClick={(e) => e.preventDefault()}>{linkOption.label}</a>
12
                        : <a href={linkOption.href[0] === '/' ? linkOption.href : `/${linkOption.href}`} target='framename'>{linkOption.label}</a>
12
                      : <a href={linkOption.href[0] === '/' ? linkOption.href : `/${linkOption.href}`} target='framename'>{linkOption.label}</a>
13
                    }
13
                    }
14
                    {!!linkOption.childs?.length &&
14
                    {!!linkOption.childs?.length &&
15
                        <nav className='navLinkLevelThree'>
15
                        <nav className='navigation-level_three'>
16
                            <ul>
16
                            <ul>
17
                                {linkOption.childs?.map((optionsChild, index) =>
17
                                {linkOption.childs?.map((optionsChild, index) =>
18
                                    <li key={index}>
18
                                    <li key={index}>
19
                                        <a href={`/${optionsChild.href}`} target='framename'>{optionsChild.label}</a>
19
                                        <a href={`/${optionsChild.href}`} target='framename'>{optionsChild.label}</a>
Línea 24... Línea 24...
24
                    }
24
                    }
25
                </li>
25
                </li>
26
            )}
26
            )}
27
            </ul>
27
            </ul>
28
        </nav>
28
        </nav>
29
    )
29
  )
30
}
30
}
Línea 31... Línea -...
31
 
-
 
32
export default ListItemDropdown
31
 
-
 
32
export default ListItemDropdown