Proyectos de Subversion LeadersLinked - Backend

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
11347 nelberth 1
import React from "react";
2
import { useState } from "react";
3
import { EmojiActivity } from "./emojis/EmojiActivity";
4
import { EmojiFlags } from "./emojis/EmojiFlags";
5
import { EmojiFood } from "./emojis/EmojiFood";
6
import { EmojiNature } from "./emojis/EmojiNature";
7
import { EmojiObjects } from "./emojis/EmojiObjects";
8
import { EmojiPeople } from "./emojis/EmojiPeople";
9
import { EmojiSymbols } from "./emojis/EmojiSymbols";
10
import { EmojiTravel } from "./emojis/EmojiTravel";
11
 
12
import styles from "./emojione.module.scss";
13
 
14
const Emojione = (props) => {
15
  const { onClickEmoji } = props;
16
  const [currentTab, setCurrentTab] = useState("people");
17
 
18
  const emojiTabs = {
19
    activity: "activity",
20
    flags: "flags",
21
    food: "food",
22
    nature: "nature",
23
    objects: "objects",
24
    people: "people",
25
    symbols: "symbols",
26
    travel: "travel",
27
  };
28
 
29
  const handleChangeTab = (tabToChange) => {
30
    setCurrentTab(tabToChange);
31
  };
32
 
33
  return (
34
    <div className={styles.emojione}>
35
      <div className="smiley-panel">
36
        <ul
37
          className="nav customtab2 nav-tabs menu-tabs"
38
          // style="padding: 0;"
39
        >
40
          <li
41
            className={`menu-item ${
42
              currentTab === emojiTabs.people ? "active" : ""
43
            }`}
44
          >
45
            <a onClick={() => handleChangeTab(emojiTabs.people)}>
46
              <i className="ti-face-smile"></i>
47
            </a>
48
          </li>
49
          <li
50
            className={`menu-item ${
51
              currentTab === emojiTabs.nature ? "active" : ""
52
            }`}
53
          >
54
            <a onClick={() => handleChangeTab(emojiTabs.nature)}>
55
              <i className="ti-gallery"></i>
56
            </a>
57
          </li>
58
          <li
59
            className={`menu-item ${
60
              currentTab === emojiTabs.food ? "active" : ""
61
            }`}
62
          >
63
            <a onClick={() => handleChangeTab(emojiTabs.food)}>
64
              <i className="fa fa-cutlery"></i>
65
            </a>
66
          </li>
67
          <li
68
            className={`menu-item ${
69
              currentTab === emojiTabs.activity ? "active" : ""
70
            }`}
71
          >
72
            <a onClick={() => handleChangeTab(emojiTabs.activity)}>
73
              <i className="ti-basketball"></i>
74
            </a>
75
          </li>
76
          <li
77
            className={`menu-item ${
78
              currentTab === emojiTabs.travel ? "active" : ""
79
            }`}
80
          >
81
            <a onClick={() => handleChangeTab(emojiTabs.travel)}>
82
              <i className="fa fa-car"></i>
83
            </a>
84
          </li>
85
          <li
86
            className={`menu-item ${
87
              currentTab === emojiTabs.objects ? "active" : ""
88
            }`}
89
          >
90
            <a onClick={() => handleChangeTab(emojiTabs.objects)}>
91
              <i className="ti-light-bulb"></i>
92
            </a>
93
          </li>
94
          <li
95
            className={`menu-item ${
96
              currentTab === emojiTabs.symbols ? "active" : ""
97
            }`}
98
          >
99
            <a onClick={() => handleChangeTab(emojiTabs.symbols)}>
100
              <i className="ti-heart"></i>
101
            </a>
102
          </li>
103
          <li
104
            className={`menu-item ${
105
              currentTab === emojiTabs.flags ? "active" : ""
106
            }`}
107
          >
108
            <a onClick={() => handleChangeTab(emojiTabs.flags)}>
109
              <i className="ti-flag-alt"></i>
110
            </a>
111
          </li>
112
        </ul>
113
        <div
114
          className="tab-content" /* style="margin: 0;text-align: center;" */
115
        >
116
          <div role="tabpanel" className="tab-pane active" id=""></div>
117
        </div>
118
      </div>
119
      <EmojiPeople
120
        onClickEmoji={onClickEmoji}
121
        hidden={currentTab === emojiTabs.people ? true : false}
122
      />
123
      <EmojiNature
124
        onClickEmoji={onClickEmoji}
125
        hidden={currentTab === emojiTabs.nature ? true : false}
126
      />
127
      <EmojiFood
128
        onClickEmoji={onClickEmoji}
129
        hidden={currentTab === emojiTabs.food ? true : false}
130
      />
131
      <EmojiActivity
132
        onClickEmoji={onClickEmoji}
133
        hidden={currentTab === emojiTabs.activity ? true : false}
134
      />
135
      <EmojiTravel
136
        onClickEmoji={onClickEmoji}
137
        hidden={currentTab === emojiTabs.travel ? true : false}
138
      />
139
      <EmojiObjects
140
        onClickEmoji={onClickEmoji}
141
        hidden={currentTab === emojiTabs.objects ? true : false}
142
      />
143
      <EmojiSymbols
144
        onClickEmoji={onClickEmoji}
145
        hidden={currentTab === emojiTabs.symbols ? true : false}
146
      />
147
      <EmojiFlags
148
        onClickEmoji={onClickEmoji}
149
        hidden={currentTab === emojiTabs.flags ? true : false}
150
      />
151
    </div>
152
  );
153
};
154
 
155
export default Emojione;