@@ -57,13 +57,13 @@ This is the wrapper component that creates the vertical timeline.
57
57
58
58
- Props
59
59
60
- | name | Type | Required | Values Allowed | default values | Description |
61
- | ---------- | ------- | -------- | ------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
62
- | theme | ` object ` | ` false ` | ` colors ` | { borderDotColor: '#ffffff', descriptionColor: '#cccccc', dotColor: '#c5c5c5', eventColor: '#cccccc', lineColor: '#c5c5c5', subtitleColor: '#c5c5c5', titleColor: '#cccccc', yearColor: '#888888 ' } | Set colors in all components |
63
- | lang | ` string ` | ` false ` | ` en ` , ` es ` , ` de ` , ` tr ` or ` zh ` | ` en ` | Change the language ` from ` and ` to ` texts and change the format in the dates |
64
- | dateFormat | ` string ` | ` false ` | ` only-number ` , ` short ` , ` with-weekday ` or ` full ` | ` only-number ` | Change the presentation format of dates |
65
- | collapse | ` boolean ` | ` false ` | ` true ` or ` false ` | ` false ` | Allow collapsing description of all Content components |
66
- | withoutDay | ` boolean ` | ` false ` | ` true ` or ` false ` | ` false ` | Will hide the day of the dates of all Content components |
60
+ | name | Type | Required | Values Allowed | default values | Description |
61
+ | ---------- | --------- | -------- | ------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
62
+ | theme | ` object ` | ` false ` | ` colors ` | { borderDotColor: '#ffffff', descriptionColor: '#cccccc', dotColor: '#c5c5c5', eventColor: '#cccccc', lineColor: '#c5c5c5', subtitleColor: '#c5c5c5', titleColor: '#cccccc', yearColor: '#888888 ' } | Set colors in all components |
63
+ | lang | ` string ` | ` false ` | ` en ` , ` es ` , ` de ` , ` tr ` or ` zh ` | ` en ` | Change the language ` from ` and ` to ` texts and change the format in the dates |
64
+ | dateFormat | ` string ` | ` false ` | ` only-number ` , ` short ` , ` with-weekday ` or ` full ` | ` only-number ` | Change the presentation format of dates |
65
+ | collapse | ` boolean ` | ` false ` | ` true ` or ` false ` | ` false ` | Allow collapsing description of all Content components |
66
+ | withoutDay | ` boolean ` | ` false ` | ` true ` or ` false ` | ` false ` | Will hide the day of the dates of all Content components |
67
67
68
68
` dateFormat ` : The next table shows the different formats that can be used in the ` dateFormat ` prop and the result that will be displayed.
69
69
@@ -89,14 +89,14 @@ This component is the container of the content of each year. It is required to h
89
89
90
90
- Props
91
91
92
- | Name | Type | Required | Values Allowed | default values | Description |
93
- | ------------- | ------- | -------- | --------------------------------- | -------------- | -------------------------------------------------------------------------------- |
94
- | title | ` string ` , ` JSX.Element ` | ` true ` | any string, or some component | does not apply | The title of this block time |
95
- | startDate | ` string ` | ` true ` | ` YYYY/MM/DD ` - ` YYYY/MM ` - ` YYYY ` | does not apply | The date of the start of the content or contents |
96
- | endDate | ` string ` | ` false ` | ` YYYY/MM/DD ` - ` YYYY/MM ` - ` YYYY ` | does not apply | The date of the end of the content or contents |
97
- | active | ` boolean ` | ` false ` | ` true ` or ` false ` | ` false ` | The value is the current year, it is recommended to use it in the last Container |
98
- | withoutDay | ` boolean ` | ` false ` | ` true ` or ` false ` | ` false ` | Will hide the day of the dates for this component only |
99
- | defaultClosed | ` boolean ` | ` false ` | ` true ` or ` false ` | ` false ` | Will collapse the content of this component only |
92
+ | Name | Type | Required | Values Allowed | default values | Description |
93
+ | ------------- | ----------------------- | -------- | --------------------------------- | -------------- | -------------------------------------------------------------------------------- |
94
+ | title | ` string ` , ` JSX.Element ` | ` true ` | any string, or some component | does not apply | The title of this block time |
95
+ | startDate | ` string ` | ` true ` | ` YYYY/MM/DD ` - ` YYYY/MM ` - ` YYYY ` | does not apply | The date of the start of the content or contents |
96
+ | endDate | ` string ` | ` false ` | ` YYYY/MM/DD ` - ` YYYY/MM ` - ` YYYY ` | does not apply | The date of the end of the content or contents |
97
+ | active | ` boolean ` | ` false ` | ` true ` or ` false ` | ` false ` | The value is the current year, it is recommended to use it in the last Container |
98
+ | withoutDay | ` boolean ` | ` false ` | ` true ` or ` false ` | ` false ` | Will hide the day of the dates for this component only |
99
+ | defaultClosed | ` boolean ` | ` false ` | ` true ` or ` false ` | ` false ` | Will collapse the content of this component only |
100
100
101
101
<p align =" right " ><a href =" #top " >🔝</a ></p >
102
102
@@ -106,10 +106,10 @@ For each `Events` you need one or more `Event` component.
106
106
107
107
- Props
108
108
109
- | Name | Type | Required | Description |
110
- | ----------- | ---------------- | -------- | ---------------------------------------------------------------------------------- |
111
- | title | ` string ` | ` false ` | It's the title of one or many descriptions |
112
- | description | ` array ` of ` strings ` | ` true ` | You can write anything you want, but remember that it is consistent with the title |
109
+ | Name | Type | Required | Description |
110
+ | ----------- | -------------------- | -------- | ---------------------------------------------------------------------------------- |
111
+ | title | ` string ` | ` false ` | It's the title of one or many descriptions |
112
+ | description | ` array ` of ` strings ` | ` true ` | You can write anything you want, but remember that it is consistent with the title |
113
113
114
114
> If the title is not defined (or empty), the description will always be displayed even when the defaultClosed prop is in the Events component
115
115
@@ -125,38 +125,38 @@ The following snippet will show you how to use the library:
125
125
import { Timeline , Events , Event } from ' vertical-timeline-component-react' ;
126
126
127
127
const customTheme = {
128
- borderDotColor: ' #ffffff' ,
129
- descriptionColor: ' #262626' ,
130
- dotColor: ' #d0cdc4' ,
131
- eventColor: ' #965500' ,
132
- lineColor: ' #d0cdc4' ,
133
- subtitleColor: ' #7c7c7c' ,
134
- titleColor: ' #405b73' ,
135
- yearColor: ' #405b73' ,
128
+ borderDotColor: ' #ffffff' ,
129
+ descriptionColor: ' #262626' ,
130
+ dotColor: ' #d0cdc4' ,
131
+ eventColor: ' #965500' ,
132
+ lineColor: ' #d0cdc4' ,
133
+ subtitleColor: ' #7c7c7c' ,
134
+ titleColor: ' #405b73' ,
135
+ yearColor: ' #405b73' ,
136
136
};
137
137
138
138
class Main extends Component {
139
- render () {
140
- return (
141
- < Timeline lang= " en" theme= {customTheme} dateFormat= " only-number" collapse withoutDay>
142
- < Events
143
- title= {< a href= " #" > What is lorem Ipsum? < / div > }
144
- subtitle= " It's a fake text"
145
- startDate= " 2020/12/02"
146
- defaultClosed
147
- active
148
- >
149
- < Event
150
- title= " Lorem Ipsum"
151
- description= {[
152
- " Is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard" ,
153
- ' Is simply dummy text of the printing and typesetting industry.' ,
154
- ]}
155
- / >
156
- < / Events>
157
- < / Timeline>
158
- );
159
- }
139
+ render () {
140
+ return (
141
+ < Timeline lang= " en" theme= {customTheme} dateFormat= " only-number" collapse withoutDay>
142
+ < Events
143
+ title= {< a href= " #" > What is lorem Ipsum? < / a > }
144
+ subtitle= " It's a fake text"
145
+ startDate= " 2020/12/02"
146
+ defaultClosed
147
+ active
148
+ >
149
+ < Event
150
+ title= " Lorem Ipsum"
151
+ description= {[
152
+ " Is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard" ,
153
+ ' Is simply dummy text of the printing and typesetting industry.' ,
154
+ ]}
155
+ / >
156
+ < / Events>
157
+ < / Timeline>
158
+ );
159
+ }
160
160
}
161
161
` ` `
162
162
@@ -166,36 +166,36 @@ class Main extends Component {
166
166
import { Timeline , Events , Event } from ' vertical-timeline-component-react' ;
167
167
168
168
const Main = () => {
169
- const customTheme = {
170
- borderDotColor: ' #ffffff' ,
171
- descriptionColor: ' #262626' ,
172
- dotColor: ' #d0cdc4' ,
173
- eventColor: ' #965500' ,
174
- lineColor: ' #d0cdc4' ,
175
- subtitleColor: ' #7c7c7c' ,
176
- titleColor: ' #405b73' ,
177
- yearColor: ' #405b73' ,
178
- };
179
-
180
- return (
181
- < Timeline lang= " en" theme= {customTheme} dateFormat= " only-number" collapse withoutDay>
182
- < Events
183
- title= " What is lorem Ipsum?"
184
- subtitle= " It's a fake text"
185
- startDate= " 2020/12/02"
186
- active
187
- defaultClosed
188
- >
189
- < Event
190
- title= " Lorem Ipsum"
191
- description= {[
192
- " Is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard" ,
193
- ' Is simply dummy text of the printing and typesetting industry.' ,
194
- ]}
195
- / >
196
- < / Events>
197
- < / Timeline>
198
- );
169
+ const customTheme = {
170
+ borderDotColor: ' #ffffff' ,
171
+ descriptionColor: ' #262626' ,
172
+ dotColor: ' #d0cdc4' ,
173
+ eventColor: ' #965500' ,
174
+ lineColor: ' #d0cdc4' ,
175
+ subtitleColor: ' #7c7c7c' ,
176
+ titleColor: ' #405b73' ,
177
+ yearColor: ' #405b73' ,
178
+ };
179
+
180
+ return (
181
+ < Timeline lang= " en" theme= {customTheme} dateFormat= " only-number" collapse withoutDay>
182
+ < Events
183
+ title= " What is lorem Ipsum?"
184
+ subtitle= " It's a fake text"
185
+ startDate= " 2020/12/02"
186
+ active
187
+ defaultClosed
188
+ >
189
+ < Event
190
+ title= " Lorem Ipsum"
191
+ description= {[
192
+ " Is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard" ,
193
+ ' Is simply dummy text of the printing and typesetting industry.' ,
194
+ ]}
195
+ / >
196
+ < / Events>
197
+ < / Timeline>
198
+ );
199
199
};
200
200
` ` `
201
201
0 commit comments