@autobusal/common 0.0.7 → 0.0.8

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.
@@ -30,15 +30,15 @@ const ChangeLanguage = ({ type, t, i18n, onClose }: Props): JSX.Element => {
30
30
 
31
31
  const available = data.preferences.languages.available;
32
32
 
33
- const items = available.map(item => (
34
- <ButtonChange onClick={ () => onChange(item) }>
33
+ const items = available.map((item, index) => (
34
+ <ButtonChange key={ index } onClick={ () => onChange(item) }>
35
35
  <IoGlobeOutline />
36
36
  { `${ t('languages.change', { ns: 'common' }) } ${ t(`languages.${ item }`, { ns: 'common' }) }` }
37
37
  </ButtonChange>
38
38
  ));
39
39
 
40
40
  return (
41
- <Container ref={ ref } $type={ type } $languages={ available.length }>
41
+ <Container ref={ ref } className="change-language" $type={ type } $languages={ available.length }>
42
42
  <Title>{ t('languages.title', { ns: 'common' }) }</Title>
43
43
 
44
44
  <ContainerButtons>
@@ -1,4 +1,4 @@
1
- import styled, { css } from 'styled-components';
1
+ import styled from 'styled-components';
2
2
 
3
3
  export const Container = styled.div<{
4
4
  $type: 'top' | 'bottom'
@@ -6,19 +6,12 @@ export const Container = styled.div<{
6
6
  }>`
7
7
  position: absolute;
8
8
  bottom: calc((-1 * ${ props => props.$languages } * 27px) - 50px - 8px);
9
- left: 0;
9
+ right: 0;
10
10
  z-index: 101;
11
- width: 200px;
12
11
  padding: 10px;
13
12
  background-color: ${ props => props.theme.background.normal };
14
13
  box-shadow: ${ props => props.theme.boxShadow };
15
14
  border-radius: ${ props => props.theme.borderRadius };
16
-
17
- // // // @todo: de verificat in private
18
- // // ${ props => props.$type === 'bottom' && css`
19
- // // // top: auto;
20
- // // // bottom: 30px;
21
- // // ` }
22
15
  `;
23
16
 
24
17
  export const Title = styled.h5`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autobusal/common",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "type": "module",
5
5
  "main": "index.ts",
6
6
  "dependencies": {