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

Commit 28d5950

Browse files
committed
vertically centered icons
1 parent 85bf289 commit 28d5950

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,17 @@
1313
1- Set the Preloader color,size and animation speed once in index.js ui.Preloader.setUp("#777777ff",200,200,0.2) <br/>
1414
2- and then use it every where like below: <ui.Preloader/> ☺
1515

16+
<br>
17+
<br>
18+
1619
### Input
1720

1821
This is just like html input tag but it has better control on patterns and it will correct the user's mismatches character
1922

23+
24+
<br>
25+
<br>
26+
2027
### TagForInput
2128

2229
this component displayes a tag name on top corner of the input element passed to it
@@ -54,6 +61,10 @@ tagBackGround: string ---> the background color of the tag span -- default is wh
5461
tagColor: string ---> tagName color -- default is black
5562
<br>
5663
<br>
64+
65+
<br>
66+
<br>
67+
5768
### ItemSlider
5869
<br>
5970
this component is a slider for the cards (or divs with your own design) you pass to it.
@@ -83,6 +94,14 @@ id : string ---> this is the identifier that enables navigation button scrolling
8394
<br>
8495
rtl : boolean ---> whether the tagName should be on left corner or right -- default is false
8596
<br>
97+
color : string ---> color for the navigation buttons -- default is black
98+
<br>
99+
fontSize: string ---> font size of the navigation buttons -- default is 20px
100+
<br>
101+
top: string ---> the position of the navigation buttons from top of the container
102+
103+
<br>
104+
<br>
86105

87106
## libs
88107
Pure JS functions and classes<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.3",
3+
"version": "1.9.4",
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.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,14 +146,15 @@ export default class ItemsSlider extends Component<ItemSliderProps> {
146146
position: "relative"
147147
}
148148

149-
const top = (this.props.top) ? this.props.top : '39%';
149+
const top = (this.props.top) ? { top: this.props.top } :
150+
{ top: "50%", transform: "translate(0%,-50%)" };
150151

151152
const navButtonsStyle:object = {
152153
position: "absolute",
153154
width: "100%",
154155
display: "flex",
155156
justifyContent: "space-between",
156-
top,
157+
...top,
157158
left: "0"
158159
}
159160

0 commit comments

Comments
 (0)