ikualo-ui-kit-mobile 0.2.1 → 0.2.2

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.
@@ -218,7 +218,6 @@ const stylesButtonCircle = StyleSheet.create({
218
218
  borderRadius: 19,
219
219
  backgroundColor: theme.colors.lightPurpleBorder,
220
220
  paddingHorizontal: 8,
221
- paddingTop: 4,
222
221
  },
223
222
  'btn-circle__icon': {
224
223
  fontSize: 14,
@@ -6,7 +6,6 @@ const styleDropdown = StyleSheet.create({
6
6
  width: 'auto',
7
7
  flexDirection: 'row',
8
8
  justifyContent: 'flex-end',
9
- marginTop: 28
10
9
  },
11
10
  'dropdown-menu': { flexDirection: 'row', alignItems: 'center' },
12
11
  'dropdown-content': { backgroundColor: 'white', borderRadius: 16, padding: 16 },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ikualo-ui-kit-mobile",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "main": "src/index.ts",
5
5
  "scripts": {
6
6
  "start": "expo start",
@@ -8,13 +8,14 @@ import { theme } from '../../config/paper.config';
8
8
 
9
9
  interface IFHeaderPage {
10
10
  title: string;
11
+ hideBack?: boolean;
11
12
  navigateTo?: 'Back' | string;
12
13
  onPressBack?: () => void;
13
14
  onPressRight?: () => void;
14
15
  right: 'icon' | 'close' | 'help' | ''
15
16
  }
16
17
  export const HeaderPage = (props: IFHeaderPage) => {
17
- const { navigateTo, title, onPressBack, onPressRight, right } = props;
18
+ const { navigateTo, title, onPressBack, onPressRight, right, hideBack } = props;
18
19
  const { navigate, goBack } = useNavigation();
19
20
  const navigateToScreen = () => {
20
21
  onPressBack && onPressBack();
@@ -45,11 +46,13 @@ export const HeaderPage = (props: IFHeaderPage) => {
45
46
  ]
46
47
  return (
47
48
  <View style={stylesHeader['header']}>
48
- <TouchableOpacity onPress={navigateToScreen}>
49
- <View style={stylesHeader['header-icon-back']}>
50
- <FontAwesome6 name="chevron-left" size={16} color={theme.colors.primary} />
51
- </View>
52
- </TouchableOpacity>
49
+ {!hideBack &&
50
+ <TouchableOpacity onPress={navigateToScreen}>
51
+ <View style={stylesHeader['header-icon-back']}>
52
+ <FontAwesome6 name="chevron-left" size={16} color={theme.colors.primary} />
53
+ </View>
54
+ </TouchableOpacity>
55
+ }
53
56
  <View style={{ flex: 1, alignItems: 'center' }}>
54
57
  <Text variant="bodyMedium" style={stylesHeader['header-title']}>
55
58
  {title}
@@ -12,9 +12,10 @@ interface IFSelect {
12
12
  options: { value: string; label: ReactElement }[];
13
13
  onSelect: (value: string) => void;
14
14
  value?: string;
15
+ showInLabel?: "placeholder" | "label"
15
16
  }
16
17
  export const Select = (props: IFSelect) => {
17
- const { placeholder, options, onSelect, label, isDisabled, value } = props;
18
+ const { placeholder, options, onSelect, label, isDisabled, value, showInLabel } = props;
18
19
  const [showList, setShowList] = useState(false);
19
20
  const [selected, setSelected] = useState<ReactElement | null>(
20
21
  options?.find((option) => option.value === value)?.label ?? null
@@ -38,7 +39,7 @@ export const Select = (props: IFSelect) => {
38
39
  </TouchableNativeFeedback>
39
40
  <SelectList
40
41
  children={options}
41
- label={placeholder}
42
+ label={showInLabel === "label" ? label : placeholder}
42
43
  onDismiss={() => setShowList(false)}
43
44
  onSelect={(value) => {
44
45
  setSelected(value.label);
@@ -48,4 +49,4 @@ export const Select = (props: IFSelect) => {
48
49
  />
49
50
  </>
50
51
  );
51
- };
52
+ };