dhre-ui-kit 0.0.19 → 0.0.21
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/assets/images/bellSimple.svg +3 -0
- package/src/assets/index.ts +2 -0
- package/src/components/checkBox/CheckBox.styles.ts +0 -1
- package/src/components/dateRangePicker/DateRangePicker.styles.ts +1 -1
- package/src/components/notificationBandge/NotificationBandge.interface.tsx +3 -0
- package/src/components/notificationBandge/NotificationBandge.styles.tsx +26 -0
- package/src/components/notificationBandge/NotificationBandge.tsx +26 -0
- package/src/components/notificationBandge/index.tsx +1 -0
- package/src/index.ts +1 -0
package/package.json
CHANGED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="29" height="29" viewBox="0 0 29 29" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M18.8046 25.375C18.8046 25.5553 18.733 25.7281 18.6056 25.8556C18.4781 25.9831 18.3052 26.0547 18.125 26.0547H10.875C10.6947 26.0547 10.5218 25.9831 10.3943 25.8556C10.2669 25.7281 10.1953 25.5553 10.1953 25.375C10.1953 25.1947 10.2669 25.0219 10.3943 24.8944C10.5218 24.7669 10.6947 24.6953 10.875 24.6953H18.125C18.3052 24.6953 18.4781 24.7669 18.6056 24.8944C18.733 25.0219 18.8046 25.1947 18.8046 25.375ZM24.9343 21.6367C24.7968 21.8787 24.5974 22.0798 24.3565 22.2191C24.1156 22.3585 23.8419 22.4312 23.5636 22.4297H5.43745C5.15868 22.4291 4.88499 22.355 4.64396 22.215C4.40293 22.0749 4.20307 21.8738 4.06454 21.6319C3.92601 21.3899 3.85369 21.1158 3.85487 20.837C3.85606 20.5583 3.9307 20.2847 4.07128 20.044C4.71132 18.9406 5.66402 15.8299 5.66402 11.7812C5.66402 9.43781 6.59494 7.19036 8.252 5.5333C9.90906 3.87624 12.1565 2.94531 14.5 2.94531C16.8434 2.94531 19.0908 3.87624 20.7479 5.5333C22.405 7.19036 23.3359 9.43781 23.3359 11.7812C23.3359 15.8288 24.2897 18.9406 24.9309 20.044C25.073 20.2852 25.1482 20.5599 25.1488 20.8399C25.1494 21.1198 25.0754 21.3949 24.9343 21.6367ZM23.755 20.7305C22.8975 19.2578 21.9765 15.8231 21.9765 11.7812C21.9765 9.79834 21.1888 7.89665 19.7867 6.49452C18.3846 5.09239 16.4829 4.30469 14.5 4.30469C12.517 4.30469 10.6154 5.09239 9.21323 6.49452C7.8111 7.89665 7.02339 9.79834 7.02339 11.7812C7.02339 15.8243 6.10128 19.2578 5.24374 20.7305C5.22386 20.7649 5.21339 20.804 5.21339 20.8438C5.21339 20.8835 5.22386 20.9226 5.24374 20.957C5.2624 20.9917 5.29022 21.0206 5.32418 21.0406C5.35814 21.0606 5.39693 21.0709 5.43632 21.0703H23.5625C23.6018 21.0709 23.6406 21.0606 23.6746 21.0406C23.7085 21.0206 23.7364 20.9917 23.755 20.957C23.7749 20.9226 23.7854 20.8835 23.7854 20.8438C23.7854 20.804 23.7749 20.7649 23.755 20.7305Z" fill="white"/>
|
|
3
|
+
</svg>
|
package/src/assets/index.ts
CHANGED
|
@@ -7,6 +7,7 @@ import CaretLeft from './images/caretLeft.svg';
|
|
|
7
7
|
import HeaderIcon from './images/dotsThreeVertical.svg';
|
|
8
8
|
import CircleTick from './images/circleTick.svg';
|
|
9
9
|
import ArrowLeft from './images/arrowLeft.svg';
|
|
10
|
+
import BellSimple from './images/bellSimple.svg';
|
|
10
11
|
|
|
11
12
|
export {
|
|
12
13
|
CalenderDots,
|
|
@@ -18,4 +19,5 @@ export {
|
|
|
18
19
|
HeaderIcon,
|
|
19
20
|
CircleTick,
|
|
20
21
|
ArrowLeft,
|
|
22
|
+
BellSimple,
|
|
21
23
|
};
|
|
@@ -4,7 +4,7 @@ import {verticalScale, moderateScale} from '../../utils/stylehelper';
|
|
|
4
4
|
|
|
5
5
|
const styles = StyleSheet.create({
|
|
6
6
|
applyButton: {
|
|
7
|
-
marginTop: verticalScale(
|
|
7
|
+
marginTop: verticalScale(24),
|
|
8
8
|
height: verticalScale(48),
|
|
9
9
|
alignItems: 'center',
|
|
10
10
|
borderRadius: moderateScale(25),
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {StyleSheet} from 'react-native';
|
|
2
|
+
import {FONT_STYLES} from '../../theme/fonts';
|
|
3
|
+
|
|
4
|
+
const styles = StyleSheet.create({
|
|
5
|
+
iconContainer: {
|
|
6
|
+
position: 'relative',
|
|
7
|
+
alignItems: 'center',
|
|
8
|
+
},
|
|
9
|
+
badge: {
|
|
10
|
+
position: 'absolute',
|
|
11
|
+
top: -5,
|
|
12
|
+
right: -5,
|
|
13
|
+
minWidth: 20,
|
|
14
|
+
height: 20,
|
|
15
|
+
borderRadius: 10,
|
|
16
|
+
justifyContent: 'center',
|
|
17
|
+
alignItems: 'center',
|
|
18
|
+
backgroundColor: '#F5524A',
|
|
19
|
+
},
|
|
20
|
+
badgeText: {
|
|
21
|
+
...FONT_STYLES.L3_BOLD,
|
|
22
|
+
color: '#fff',
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
export default styles;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {View, Text} from 'react-native';
|
|
3
|
+
import {BellSimple} from '../../assets';
|
|
4
|
+
import styles from './NotificationBandge.styles';
|
|
5
|
+
import {NotificationBandgeProps} from './NotificationBandge.interface';
|
|
6
|
+
|
|
7
|
+
const NotificationBandge: React.FC<NotificationBandgeProps> = ({
|
|
8
|
+
notificationCount = 0,
|
|
9
|
+
}) => {
|
|
10
|
+
if (notificationCount <= 0) {
|
|
11
|
+
return <BellSimple />;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<View style={styles.iconContainer}>
|
|
16
|
+
<BellSimple />
|
|
17
|
+
<View style={styles.badge}>
|
|
18
|
+
<Text style={[styles.badgeText]}>
|
|
19
|
+
{notificationCount > 99 ? '99+' : notificationCount}
|
|
20
|
+
</Text>
|
|
21
|
+
</View>
|
|
22
|
+
</View>
|
|
23
|
+
);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export default NotificationBandge;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {default} from './NotificationBandge';
|
package/src/index.ts
CHANGED
|
@@ -30,5 +30,6 @@ export {default as Topic} from './components/topic';
|
|
|
30
30
|
export {default as ContactModel} from './components/ContactModel';
|
|
31
31
|
export {default as DateRangePicker} from './components/dateRangePicker';
|
|
32
32
|
export {default as OurOfficesButton} from './components/OutOfOffice';
|
|
33
|
+
export {default as NotificationBandge} from './components/notificationBandge';
|
|
33
34
|
|
|
34
35
|
export * from './utils/stylehelper';
|