-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
front: insert div in manchette with space time chart
Signed-off-by: theocrsb <[email protected]>
- Loading branch information
Showing
23 changed files
with
178 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
ui-manchette-with-spacetimechart/src/stories/split.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import React from 'react'; | ||
|
||
import type { Meta } from '@storybook/react'; | ||
|
||
import '@osrd-project/ui-core/dist/theme.css'; | ||
import '@osrd-project/ui-manchette/dist/theme.css'; | ||
import '@osrd-project/ui-manchette-with-spacetimechart/dist/theme.css'; | ||
|
||
import { SAMPLE_WAYPOINTS, SAMPLE_PATHS_DATA } from '../assets/sampleData'; | ||
import ManchetteWithSpaceTimeChart from '../components/ManchetteWithSpaceTimeChart'; | ||
|
||
const meta: Meta<typeof ManchetteWithSpaceTimeChart> = { | ||
title: 'Manchette with SpaceTimeChart/split', | ||
component: ManchetteWithSpaceTimeChart, | ||
}; | ||
|
||
const customDiv = <div style={{ height: '100', backgroundColor: '#EFF3F5' }} />; | ||
|
||
const allWaypoints = SAMPLE_WAYPOINTS.map((waypoint, index) => { | ||
if (index === 0 || index === 1 || index === 3) { | ||
return [waypoint, customDiv]; | ||
} | ||
return waypoint; | ||
}).flat(); | ||
|
||
export default meta; | ||
|
||
export const Default = { | ||
args: { | ||
contents: allWaypoints, | ||
projectPathTrainResult: SAMPLE_PATHS_DATA, | ||
selectedTrain: 1, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.