Skip to content

Commit cc8434d

Browse files
Version 1.2.0
2 parents 60f62e4 + 9f0d364 commit cc8434d

25 files changed

+3424
-3247
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## 1.2.0
6+
7+
### Added
8+
9+
- Support for tab-based categorization, tabular styles and formats exposure.
10+
511
## 1.1.0
612

713
### Added

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ customStyles | Object for custom styling | CustomStyle | {} |
6262
loadMoreLabel | Text shown on the load more component | string | "Load More" |
6363
hideBadge | Toggle to hide or show the badge | boolean | false |
6464
darkMode | Toggle to enable dark mode | boolean | false |
65+
hideTab | Toggle to enable all and unread tabs | false |
66+
tabProps | Props for customizing tab. <br>tabs - List of tab items. <br> activeTab - Active tab index. | tabProps| { tabs: [<br>{ key: 'all', title: 'All' },<br>{ key: 'unread', title: 'Unread' }<br>],activeTab: 0} |
6567
itemsPerFetch | Number of notifications fetch per api request (have a max cap of 50) | number | 20 |
6668
windowViewOnly | Toggle to enable fit-to-screen window or modal view | boolean | false |
6769
notificationIcon | Option to use custom notification Icon | JSX Element | null |
@@ -125,6 +127,15 @@ type ThemeProps = {
125127
color?: string,
126128
background?: string,
127129
},
130+
tabs?: {
131+
containerBackgroundColor?: string,
132+
activeTabBackgroundColor?: string,
133+
activeTabTextColor?: string,
134+
inactiveTabTextColor?: string,
135+
indicatorColor?: string,
136+
borderColor?: string,
137+
inactiveTabBackgroundColor?: string
138+
};
128139
};
129140
```
130141

@@ -185,6 +196,20 @@ Please note that the badgeStyle, window shadow and border props are only applica
185196
clearAllIcon?:{
186197
size?: number
187198
},
199+
tabs?: {
200+
containerHeight?: number,
201+
tabPadding?: number,
202+
activeTabTextSize?: number,
203+
inactiveTabTextSize?: number,
204+
activeTabTextWeight?: TextStyle['fontWeight'],
205+
inactiveTabTextWeight?: TextStyle['fontWeight'],
206+
indicatorHeight?: number,
207+
headingGap?: number,
208+
borderWidth?: number,
209+
borderRadius?: number,
210+
paddingY?: number,
211+
paddingX?: number
212+
};
188213
}
189214
```
190215

example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"react": "^18.2.0",
77
"react-dom": "^18.2.0",
88
"react-scripts": "^5.0.1",
9-
"@sirenapp/react-inbox": "^1.1.0"
9+
"@sirenapp/react-inbox": "^1.2.0"
1010
},
1111
"scripts": {
1212
"dev": "PORT=9902 react-scripts start",

example/src/App.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,11 @@ const App: React.FC = () => {
8383
<div>
8484
<div style={{ color: "#fff", fontWeight: "600" }}>Siren</div>
8585
</div>
86-
<div>
87-
<div style={{ color: "#fff", fontWeight: "600" }} onClick={() => markAsReadByDate(String(new Date().getTime()))}>Mark allAsRead</div>
86+
<div
87+
style={{ color: "#fff", fontWeight: "600" }}
88+
onClick={() => markAsReadByDate({ startDate: String(new Date().getTime()) })}
89+
>
90+
Mark allAsRead
8891
</div>
8992
</div>
9093
);

0 commit comments

Comments
 (0)