imbric-theme 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -71,7 +71,7 @@
71
71
 
72
72
  @media (min-width: 992px) {
73
73
  .modal {
74
- max-width: 465px;
74
+ max-width: 520px;
75
75
  height: auto;
76
76
  border-radius: var(--border-radius-sm);
77
77
  /* max-height: 100%;
@@ -9,8 +9,25 @@ import Heading from '../../atoms/Heading/Heading'
9
9
  import Tabs from '../../molecules/Tabs/Tabs'
10
10
  import Icon from '../../atoms/Icon'
11
11
 
12
- export const Navbar = ({ getStyles, viewTabsNav, viewOptionsNav, children, linkLogout, linkLegal, linkInfo, linkProfile, txtTootipLegal, txtTootipInfo, txtTootipProfile, languageSwitchLink }) => {
13
-
12
+ export const Navbar = ({
13
+ getStyles,
14
+ viewTabsNav,
15
+ viewOptionsNav,
16
+ isViewLegal,
17
+ isViewInfo,
18
+ isViewProfile,
19
+ isViewLogout,
20
+ children,
21
+ linkLogout,
22
+ linkLegal,
23
+ linkInfo,
24
+ linkProfile,
25
+ txtTootipLegal,
26
+ txtTootipInfo,
27
+ txtTootipProfile,
28
+ languageSwitchLink,
29
+
30
+ }) => {
14
31
 
15
32
  const router = useRouter();
16
33
 
@@ -87,114 +104,97 @@ export const Navbar = ({ getStyles, viewTabsNav, viewOptionsNav, children, linkL
87
104
  {viewOptionsNav ? (
88
105
  <div className={getStyles('navbar__actions')}>
89
106
 
90
-
91
- <span
92
- data-tip
93
- data-for='legal'
94
- onMouseEnter={handleMouseEnter}
95
- onMouseLeave={handleMouseLeave}
96
- >
97
- <Icon
98
- size='lg'
99
- name='legal'
100
- color='highlight'
101
- background='transparent'
102
- onClick={linkLegal}
103
- />
104
-
105
- </span>
106
-
107
- {isToolTipMounted ? (
108
- <ReactTooltip id='legal' type='error'>
109
- <span>{txtTootipLegal}</span>
110
- </ReactTooltip>
107
+ {isViewLegal ? (
108
+ <>
109
+ <span
110
+ data-tip
111
+ data-for='legal'
112
+ onMouseEnter={handleMouseEnter}
113
+ onMouseLeave={handleMouseLeave}
114
+ >
115
+ <Icon
116
+ size='lg'
117
+ name='legal'
118
+ color='highlight'
119
+ background='transparent'
120
+ onClick={linkLegal}
121
+ />
122
+
123
+ </span>
124
+
125
+ {isToolTipMounted ? (
126
+ <ReactTooltip id='legal' type='error'>
127
+ <span>{txtTootipLegal}</span>
128
+ </ReactTooltip>
129
+ ) : null}
130
+ </>
111
131
  ) : null}
112
132
 
113
-
114
-
115
-
116
- <span
117
- data-tip
118
- data-for='info'
119
- onMouseEnter={handleMouseEnter}
120
- onMouseLeave={handleMouseLeave}
121
- >
122
- <Icon
123
- size='lg'
124
- name='info'
125
- color='highlight'
126
- background='transparent'
127
- onClick={linkInfo}
128
- />
129
-
130
- </span>
131
-
132
- {isToolTipMounted ? (
133
- <ReactTooltip id='info' type='error'>
134
- <span>{txtTootipInfo}</span>
135
- </ReactTooltip>
133
+ {isViewInfo ? (
134
+ <>
135
+ <span
136
+ data-tip
137
+ data-for='info'
138
+ onMouseEnter={handleMouseEnter}
139
+ onMouseLeave={handleMouseLeave}
140
+ >
141
+ <Icon
142
+ size='lg'
143
+ name='info'
144
+ color='highlight'
145
+ background='transparent'
146
+ onClick={linkInfo}
147
+ />
148
+
149
+ </span>
150
+
151
+ {isToolTipMounted ? (
152
+ <ReactTooltip id='info' type='error'>
153
+ <span>{txtTootipInfo}</span>
154
+ </ReactTooltip>
155
+ ) : null}
156
+ </>
136
157
  ) : null}
137
158
 
159
+ {isViewProfile ? (
160
+ <>
161
+ <span
162
+ data-tip
163
+ data-for='profile'
164
+ onMouseEnter={handleMouseEnter}
165
+ onMouseLeave={handleMouseLeave}
166
+ >
167
+ <Icon
168
+ size='lg'
169
+ name='profile'
170
+ color='highlight'
171
+ background='transparent'
172
+ onClick={linkProfile}
173
+ />
174
+
175
+ </span>
176
+
177
+ {isToolTipMounted ? (
178
+ <ReactTooltip id='profile' type='error'>
179
+ <span>{txtTootipProfile}</span>
180
+ </ReactTooltip>
181
+ ) : null}
182
+ </>
183
+ ) : null}
138
184
 
185
+ {languageSwitchLink}
139
186
 
140
- <span
141
- data-tip
142
- data-for='profile'
143
- onMouseEnter={handleMouseEnter}
144
- onMouseLeave={handleMouseLeave}
145
- >
187
+ {isViewLogout ? (
146
188
  <Icon
147
189
  size='lg'
148
- name='profile'
190
+ name='logout'
149
191
  color='highlight'
150
192
  background='transparent'
151
- onClick={linkProfile}
193
+ onClick={linkLogout}
152
194
  />
153
-
154
- </span>
155
-
156
- {isToolTipMounted ? (
157
- <ReactTooltip id='profile' type='error'>
158
- <span>{txtTootipProfile}</span>
159
- </ReactTooltip>
160
195
  ) : null}
161
196
 
162
197
 
163
-
164
-
165
- {/* <DynamicSelect
166
- isClearable={false}
167
- // defaultValue={{
168
- // label: 'ES',
169
- // value: 'es'
170
- // }}
171
- defaultValue={defaultValueLanguage}
172
- onChange={handleChangeLanguage}
173
- optionsSelect={optionsSelectLanguage}
174
- // optionsSelect={[
175
- // {
176
- // label: 'ES',
177
- // value: 'es'
178
- // },
179
- // {
180
- // label: 'EN',
181
- // value: 'en'
182
- // }
183
- // ]}
184
- /> */}
185
-
186
- {languageSwitchLink}
187
-
188
- <Icon
189
- size='lg'
190
- name='logout'
191
- color='highlight'
192
- background='transparent'
193
- onClick={linkLogout}
194
- />
195
-
196
-
197
-
198
198
  </div>
199
199
 
200
200
  ) : null}
@@ -224,12 +224,20 @@ Navbar.propTypes = {
224
224
  linkProfile: PropTypes.func,
225
225
  handleChange: PropTypes.func,
226
226
  languageSwitchLink: PropTypes.any.isRequired,
227
+ isViewLegal: PropTypes.bool,
228
+ isViewInfo: PropTypes.bool,
229
+ isViewProfile: PropTypes.bool,
230
+ isViewLogout: PropTypes.bool,
227
231
  }
228
232
 
229
233
  Navbar.defaultProps = {
230
234
  viewTabsNav: false,
231
235
  viewOptionsNav: true,
232
236
  getStyles: () => { },
237
+ isViewLegal: true,
238
+ isViewInfo: true,
239
+ isViewProfile: true,
240
+ isViewLogout: true,
233
241
  }
234
242
 
235
243
  export default withStyles(styles)(Navbar)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "imbric-theme",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "Components library IMBRIC",
5
5
  "private": false,
6
6
  "main": "index.js",