Skip to content

Commit 6069963

Browse files
committed
FEAT : Readme updated to accomate version 1.0.0
1 parent d40d04f commit 6069963

File tree

7 files changed

+401
-74
lines changed

7 files changed

+401
-74
lines changed

README.md

Lines changed: 99 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ components: {
5757
| show-label | Boolean | If true, labels will be displayed |
5858
| show-bridge | Boolean | If true, the bridges will be displayed (bridges will be displayed on small devices, irrespective of this) |
5959
| show-bridge-on-small-devices | Boolean | If false, the bridges will be hidden even on smaller devices |
60+
| styles | Object | Provide custom style for various UI components |
61+
| colors | Object | Provide colrs for various UI components |
6062

6163
### Events
6264

@@ -67,41 +69,108 @@ components: {
6769

6870
### Customization
6971

70-
Since customization can vary hugely for each use case, i thought it would be too much hassle to pass colors, width and height as props.
71-
Instead overwriting the styles would be way simpler. Just make sure to use
72-
`!important`
73-
on every style you want to overwrite.
74-
Here is a complete set of css classes used in the project
72+
This package has been created by taking your customization needs in mind. You can not only provide colors for components for different states (active, inactive and completed), you can do custom styling for each component in the UI. Here is an example.
7573

76-
```css
77-
.progress__wrapper {
78-
}
79-
.progress__block {
80-
}
81-
.progress__bridge {
82-
}
83-
.progress__bubble {
84-
}
85-
.progress__label {
86-
}
87-
.progress__bubble-completed {
88-
}
89-
.progress__bubble-active {
90-
}
91-
.progress__label-completed {
92-
}
93-
.progress__label-active {
94-
}
95-
.progress__bridge-completed {
74+
```js
75+
// this is the default style being used in the package
76+
// set this as data in the parent component
77+
styleData: {
78+
progress__wrapper: {
79+
display: "-ms-flexbox",
80+
display: "flex",
81+
flexWrap: "wrap",
82+
display: "flex",
83+
justifyContent: "flex-start",
84+
margin: "1rem 0",
85+
},
86+
progress__block: {
87+
display: "flex",
88+
alignItems: "center",
89+
},
90+
progress__bridge: {
91+
backgroundColor: "grey",
92+
height: "2px",
93+
flexGrow: "1",
94+
width: "20px",
95+
},
96+
progress__bubble: {
97+
margin: "0",
98+
padding: "0",
99+
lineHeight: "30px",
100+
display: "flex",
101+
justifyContent: "center",
102+
alignItems: "center",
103+
height: "30px",
104+
width: "30px",
105+
borderRadius: "100%",
106+
backgroundColor: "transparent",
107+
border: "2px grey solid",
108+
textAlign: "center",
109+
},
110+
progress__label: {
111+
margin: "0 0.8rem",
112+
},
96113
}
114+
115+
// use above data as prop
116+
<vue-step-progress-indicator
117+
:styles="styleData"
118+
/>
97119
```
98120

99-
The style also include one simple media query to hide labels on smaller devices. Labels are hidden and bridges are shown on smaller devices by default. You can change the
100-
behaviour by using above listed props, or by changing the styles.
121+
You may also want to customize the colors of components. The progress bubbles can have one of three states, `active`, `inactive` & `completed`. You can set `color`, `backgroundColor`, `borderColor` for each component. You can pass colors for each component as:
122+
123+
```js
124+
// this is the default colors being used in the package
125+
// set this as data in the parent component
126+
colorData: {
127+
progress__bubble: {
128+
active: {
129+
color: "#fff",
130+
backgroundColor: "red",
131+
borderColor: "red",
132+
},
133+
inactive: {
134+
color: "black",
135+
},
136+
completed: {
137+
color: "#fff",
138+
borderColor: "#1e7e34",
139+
backgroundColor: "#1e7e34",
140+
},
141+
},
142+
progress__label: {
143+
active: {
144+
color: "red",
145+
},
146+
inactive: {
147+
color: "black",
148+
},
149+
completed: {
150+
color: "#1e7e34",
151+
},
152+
},
153+
progress__bridge: {
154+
active: {
155+
backgroundColor: "black",
156+
borderColor: "black",
157+
},
158+
inactive: {
159+
backgroundColor: "black",
160+
borderColor: "black",
161+
},
162+
completed: {
163+
backgroundColor: "#1e7e34",
164+
borderColor: "#1e7e34",
165+
},
166+
},
167+
},
168+
169+
// use above data as prop
170+
<vue-step-progress-indicator
171+
:colors="colorData"
172+
/>
101173

102-
```css
103-
@media (max-width: 768px) {
104-
}
105174
```
106175

107176
### Screenshots

dev/serve.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ export default Vue.extend({
5353
'Select Template',
5454
'Send Invitations',
5555
'Done',
56-
'Done',
5756
]"
5857
:active-step="0"
5958
:reactivity-type="'single-step'"

0 commit comments

Comments
 (0)