Skip to content
This repository was archived by the owner on Jul 10, 2024. It is now read-only.

Commit 97ea61c

Browse files
committed
added property to display or don't display navigation buttons
1 parent 4a3e6fa commit 97ea61c

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ color : string ---> color for the navigation buttons -- default is black
9999
fontSize: string ---> font size of the navigation buttons -- default is 20px
100100
<br>
101101
top: string ---> the position of the navigation buttons from top of the container
102+
<br>
103+
noNavButtons: boolean ---> display or don't display Navigation Buttons -- default is false(display)
102104

103105
<br>
104106
<br>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "saffroncodejs",
3-
"version": "1.9.5",
3+
"version": "1.9.7",
44
"description": "Package of optimised react components and javascript functions for developers ♫♪",
55
"main": "./lib/SaffronCode.js",
66
"types": "./lib/SaffronCode.d.ts",

src/ui/ItemsSlider.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
overflow-x: scroll;
33
overflow-y: hidden;
44
padding: 10px 0 15px 0;
5-
margin: 0 20px 0 40px;
5+
margin: 0 20px 0 20px;
66
display: flex;
77
-ms-overflow-style: none;
88
scrollbar-width: none;

src/ui/ItemsSlider.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ interface ItemSliderProps {
1212
rtl: boolean,
1313
top: string,
1414
fontSize: string,
15-
color: string
15+
color: string,
16+
noNavButtons: boolean
1617
}
1718

1819
export default class ItemsSlider extends Component<ItemSliderProps> {
@@ -152,10 +153,10 @@ export default class ItemsSlider extends Component<ItemSliderProps> {
152153
const navButtonsStyle:object = {
153154
position: "absolute",
154155
width: "100%",
155-
display: "flex",
156+
display: (!this.props.noNavButtons) ? "flex" : "none",
156157
justifyContent: "space-between",
157158
...top,
158-
left: "0"
159+
left: "0",
159160
}
160161

161162
const fontSize = (this.props.fontSize) ? this.props.fontSize : '20px';

0 commit comments

Comments
 (0)