Skip to content

Commit

Permalink
add story for TimeLine
Browse files Browse the repository at this point in the history
  • Loading branch information
joakbjerk committed Aug 29, 2023
1 parent c906f15 commit 5a8997d
Showing 1 changed file with 61 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import React from 'react'
import Section from '../../Section'
import Timeline from '../Timeline'
import FormRow from '../../FormRow'
import Input from '../../Input'

export default {
title: 'Eufemia/Components/Timeline',
}

export const TimelineTest = () => {
const [value, setValue] = React.useState('123')
return (
<>
<Section>
<Timeline space>
<Timeline.Item
title="Completed event"
subtitle="10. september 2021"
state="completed"
/>
<Timeline.Item
title="Current event"
infoMessage="Additional information about this step if needed."
state="current"
subtitle={
<FormRow top vertical>
<Input
value={value}
on_change={({ value }) => {
setValue(value)
}}
label="Should be able to change next subtitle input value from here"
/>
</FormRow>
}
/>
<Timeline.Item
title="Upcoming event"
state="upcoming"
subtitle={
<FormRow top vertical>
<Input value={value} label="Should work" />
</FormRow>
}
/>
</Timeline>
</Section>

<FormRow top left vertical>
<Input
value={value}
on_change={({ value }) => {
setValue(value)
}}
label="Works"
/>
</FormRow>
</>
)
}

0 comments on commit 5a8997d

Please sign in to comment.