-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathBorder.js
More file actions
23 lines (23 loc) · 895 Bytes
/
Border.js
File metadata and controls
23 lines (23 loc) · 895 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
export default {
all:(width = 0, color = "transparent")=>({width, color}),
horizontal:(width = 0, color = "transparent")=>({leftWidth: width, leftColor: color, rightWidth: width, rightColor: color}),
vertical:(width = 0, color = "transparent")=>({bottomWidth: width, bottomColor: color, topWidth: width, topColor: color}),
only:({
top = {width: 0 , color:"transparent"},
bottom = {width: 0 , color:"transparent"},
left = {width: 0 , color:"transparent"},
right = {width: 0 , color:"transparent"}}) =>
({
topWidth: top.width,
topColor: top.color,
bottomWidth: bottom.width,
bottomColor: bottom.color,
leftWidth: left.width,
leftColor: left.color,
rightWidth: right.width,
rightColor: right.color,
})
}
export const borderSide = {
init:(width = 0, color = 'transparent')=>({width, color})
}