wca-designsystem 0.0.18 → 0.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/atomos/IconeBotao/index.tsx +2 -2
- package/src/components/modules/ConchaAplicacao/ConchaAplicacao.test.tsx +1 -0
- package/src/components/modules/ConchaAplicacao/index.tsx +3 -0
- package/src/components/modules/Navbar/Navbar.test.tsx +2 -0
- package/src/components/modules/Navbar/index.tsx +10 -1
package/package.json
CHANGED
|
@@ -15,12 +15,12 @@ const IconeBotao = ({ tipo, toolTipInfo, ...props }: IconeBotaoProps) => {
|
|
|
15
15
|
(tipo: 'table' | 'round') => {
|
|
16
16
|
const selectsTipos = {
|
|
17
17
|
round: (
|
|
18
|
-
<HoverPopUp texto={toolTipInfo!}>
|
|
18
|
+
<HoverPopUp texto={toolTipInfo!} width={75}>
|
|
19
19
|
<S.IconeBotaoDefault {...props} data-testid="round" />
|
|
20
20
|
</HoverPopUp>
|
|
21
21
|
),
|
|
22
22
|
table: (
|
|
23
|
-
<HoverPopUp texto={toolTipInfo!}>
|
|
23
|
+
<HoverPopUp texto={toolTipInfo!} width={100}>
|
|
24
24
|
<S.IconeBotaoTable {...props} data-testid="table" />
|
|
25
25
|
</HoverPopUp>
|
|
26
26
|
),
|
|
@@ -15,6 +15,7 @@ type ConchaAplicacaolType = {
|
|
|
15
15
|
isNavHover: boolean;
|
|
16
16
|
navbarRef?: React.RefObject<HTMLDivElement>;
|
|
17
17
|
temNotificacoes?: boolean;
|
|
18
|
+
sairFunc: () => void;
|
|
18
19
|
activeLink: string;
|
|
19
20
|
};
|
|
20
21
|
export function ConchaAplicacao({
|
|
@@ -22,6 +23,7 @@ export function ConchaAplicacao({
|
|
|
22
23
|
modulo,
|
|
23
24
|
temNotificacoes,
|
|
24
25
|
isNavHover,
|
|
26
|
+
sairFunc,
|
|
25
27
|
activeLink,
|
|
26
28
|
notificacoes,
|
|
27
29
|
links,
|
|
@@ -43,6 +45,7 @@ export function ConchaAplicacao({
|
|
|
43
45
|
>
|
|
44
46
|
<S.ConchaAplicacaoNavbarWrapper ref={navbarRef} data-active={isNavHover}>
|
|
45
47
|
<Navbar
|
|
48
|
+
sairFunc={sairFunc}
|
|
46
49
|
activeLink={activeLink}
|
|
47
50
|
modulo={modulo}
|
|
48
51
|
isHover={isNavHover}
|
|
@@ -10,6 +10,7 @@ describe('Navbar está renderizando corretamente', () => {
|
|
|
10
10
|
<Navbar
|
|
11
11
|
activeLink=""
|
|
12
12
|
modulo="exemplo"
|
|
13
|
+
sairFunc={() => console.log('aqui')}
|
|
13
14
|
isHover={false}
|
|
14
15
|
links={LinksDinamicosMock}
|
|
15
16
|
/>
|
|
@@ -21,6 +22,7 @@ describe('Navbar está renderizando corretamente', () => {
|
|
|
21
22
|
const { getByTestId, queryByText } = render(
|
|
22
23
|
<Navbar
|
|
23
24
|
activeLink=""
|
|
25
|
+
sairFunc={() => console.log('aqui')}
|
|
24
26
|
modulo="exemplo"
|
|
25
27
|
isHover={true}
|
|
26
28
|
links={LinksDinamicosMock}
|
|
@@ -19,8 +19,15 @@ export type NavbarType = {
|
|
|
19
19
|
modulo: string;
|
|
20
20
|
links?: LinksProps[];
|
|
21
21
|
activeLink: string;
|
|
22
|
+
sairFunc: () => void;
|
|
22
23
|
};
|
|
23
|
-
const Navbar = ({
|
|
24
|
+
const Navbar = ({
|
|
25
|
+
isHover,
|
|
26
|
+
sairFunc,
|
|
27
|
+
links,
|
|
28
|
+
modulo,
|
|
29
|
+
activeLink,
|
|
30
|
+
}: NavbarType) => {
|
|
24
31
|
const LogoHeader = useMemo(() => (isHover ? Logo : LogoInitial), [isHover]);
|
|
25
32
|
|
|
26
33
|
return (
|
|
@@ -39,9 +46,11 @@ const Navbar = ({ isHover, links, modulo, activeLink }: NavbarType) => {
|
|
|
39
46
|
|
|
40
47
|
<IconeBotao
|
|
41
48
|
tipo="round"
|
|
49
|
+
toolTipInfo="Sair"
|
|
42
50
|
size={'sm'}
|
|
43
51
|
variant="transparent"
|
|
44
52
|
color="gray"
|
|
53
|
+
onClick={sairFunc}
|
|
45
54
|
style={{ display: isHover ? 'block' : 'none' }}
|
|
46
55
|
className="action-icon"
|
|
47
56
|
>
|