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 CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.0.18",
2
+ "version": "0.0.19",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -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
  ),
@@ -27,6 +27,7 @@ describe('AppShelCollapsed rendering', () => {
27
27
  <ConchaAplicacao
28
28
  activeLink=""
29
29
  isNavHover={true}
30
+ sairFunc={() => console.log('aqui')}
30
31
  modulo="exemplo"
31
32
  notificacoes={mockNotifications}
32
33
  links={LinksDinamicosMock}
@@ -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 = ({ isHover, links, modulo, activeLink }: NavbarType) => {
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
  >