Skip to content

Docs - Timeline - fix live components #3611

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 13, 2025
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
159 changes: 55 additions & 104 deletions src/components/timeline/timeline.api.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,30 +29,18 @@
}
],
"snippet": [
"<Timeline ",
" topLine={{",
" state: Timeline.states.ERROR",
" }$1}",
" bottomLine={{",
" type: Timeline.lineTypes.DASHED,",
" color: Colors.orange40",
" }$2}",
" point={{",
" type: Timeline.pointTypes.OUTLINE,",
" color: Colors.orange40,",
" icon: Assets.icons.demo.camera,",
" anchorRef: alignToTitle ? titleRef : undefined",
" }$3}",
"<Timeline",
" topLine={{type: Timeline.lineTypes.DASHED}}",
" bottomLine={{state: Timeline.states.SUCCESS}}",
" point={{state: Timeline.states.SUCCESS}}",
">",
" <View flex centerH paddingH-20>",
" <Text text70 dark10 ref={titleRef}>",
" {title}",
" </Text>",
" <Text dark40>",
" {description}",
" </Text>",
" </View>",
"</Timeline>"
" <View padding-20 bg-grey60 br30>",
" <Text text70BO>Title</Text>",
" <View marginT-5 padding-8 bg-white br30>",
" <Text>Description</Text>",
" </View>",
" </View>",
" </Timeline>"
],
"docs": {
"hero": {
Expand Down Expand Up @@ -138,29 +126,7 @@
"title": "Current",
"content": [
{
"props": {
"state": "current",
"point": {
"type": {
"type": "bullet"
}
},
"bottomLine": {
"type": {
"type": "solid"
}
}
}
},
{
"props": {
"point": {
"type": {
"type": "bullet",
"color": "#116DFF"
}
}
}
"snippet": "<Timeline topLine={{state: Timeline.states.CURRENT}} bottomLine={{state: Timeline.states.CURRENT}} point={{state: Timeline.states.CURRENT}}><View style={{height: 88}}/></Timeline>"
}
],
"description": "state: current"
Expand All @@ -169,19 +135,7 @@
"title": "Next",
"content": [
{
"props": {
"state": "next",
"point": {
"type": {
"type": "bullet"
}
},
"bottomLine": {
"type": {
"type": "solid"
}
}
}
"snippet": "<Timeline topLine={{state: Timeline.states.NEXT}} bottomLine={{state: Timeline.states.NEXT}} point={{state: Timeline.states.NEXT, type: Timeline.pointTypes.CIRCLE}}><View style={{height: 88}}/></Timeline>"
}
],
"description": "state: next"
Expand All @@ -190,19 +144,7 @@
"title": "Error",
"content": [
{
"props": {
"state": "error",
"point": {
"type": {
"type": "bullet"
}
},
"bottomLine": {
"type": {
"type": "solid"
}
}
}
"snippet": "<Timeline topLine={{state: Timeline.states.ERROR}} bottomLine={{state: Timeline.states.ERROR}} point={{state: Timeline.states.ERROR}}><View style={{height: 88}}/></Timeline>"
}
],
"description": "state: error"
Expand All @@ -211,19 +153,7 @@
"title": "Success",
"content": [
{
"props": {
"state": "success",
"point": {
"type": {
"type": "bullet"
}
},
"bottomLine": {
"type": {
"type": "solid"
}
}
}
"snippet": "<Timeline topLine={{state: Timeline.states.SUCCESS}} bottomLine={{state: Timeline.states.SUCCESS}} point={{state: Timeline.states.SUCCESS}}><View style={{height: 88}}/></Timeline>"
}
],
"description": "state: success"
Expand All @@ -238,15 +168,30 @@
"items": [
{
"title": "Bullet",
"description": "type: bullet"
"description": "type: bullet",
"content": [
{
"snippet": "<Timeline point={{type: Timeline.pointTypes.BULLET}}><View style={{height: 88}}/></Timeline>"
}
]
},
{
"title": "Circle",
"description": "type: circle"
"description": "type: circle",
"content": [
{
"snippet": "<Timeline point={{state: Timeline.states.NEXT, type: Timeline.pointTypes.CIRCLE}}><View style={{height: 88}}/></Timeline>"
}
]
},
{
"title": "Outline",
"description": "type: outline"
"description": "type: outline",
"content": [
{
"snippet": "<Timeline point={{type: Timeline.pointTypes.OUTLINE}}><View style={{height: 88}}/></Timeline>"
}
]
}
],
"title": "Point",
Expand All @@ -260,14 +205,7 @@
"title": "Text",
"content": [
{
"props": {
"state": "current",
"bottomLine": {
"type": {
"type": "solid"
}
}
}
"snippet": "<Timeline point={{label: '1'}}><View style={{height: 88}}/></Timeline>"
}
],
"description": "text: “1”"
Expand All @@ -276,20 +214,18 @@
"title": "Icon",
"content": [
{
"props": {
"state": "current",
"bottomLine": {
"type": {
"type": "dashed"
}
}
}
"snippet": "<Timeline point={{state: Timeline.states.SUCCESS, icon: Assets.icons.checkSmall}}><View style={{height: 88}}/></Timeline>"
}
],
"description": "icon: Assets.icons.general.checkmarkSmall"
},
{
"title": "Icon without background",
"content": [
{
"snippet": "<Timeline point={{state: Timeline.states.SUCCESS, icon: Assets.icons.search, removeIconBackground: true}}><View style={{height: 88}}/></Timeline>"
}
],
"description": "icon: Assets.icons.general.favorite, removeIconBackground: true"
}
],
Expand All @@ -301,10 +237,20 @@
"items": [
{
"title": "Solid",
"content": [
{
"snippet": "<Timeline topLine={{state: Timeline.states.CURRENT}} point={{removeIconBackground: true}}><View style={{height: 88}}/></Timeline>"
}
],
"description": "type: solid"
},
{
"title": "Dashed",
"content": [
{
"snippet": "<Timeline topLine={{state: Timeline.states.CURRENT, type: Timeline.lineTypes.DASHED}} point={{removeIconBackground: true}}><View style={{height: 88}}/></Timeline>"
}
],
"description": "type: dashed"
}
],
Expand All @@ -317,6 +263,11 @@
"items": [
{
"title": "Entry",
"content": [
{
"snippet": "<Timeline topLine={{state: Timeline.states.NEXT, entry: true}} bottomLine={{state: Timeline.states.NEXT, entry: true}} point={{removeIconBackground: true}}><View style={{height: 88}}/></Timeline>"
}
],
"description": "entry: true"
}
],
Expand Down