Skip to content

Commit

Permalink
docs: fix measurement-plot story (#661)
Browse files Browse the repository at this point in the history
  • Loading branch information
wadjih-bencheikh18 committed Feb 12, 2024
1 parent 3a3bdc6 commit 48ae20c
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions stories/app/measurements/measurement-plot.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,22 @@ export default {
title: 'Layout/MeasurementPlot',
};

export function Control(props: Omit<MeasurementPlotProps, 'measurement'>) {
return <MeasurementPlot measurement={irMeasurement} {...props} />;
export function Control(
props: Omit<MeasurementPlotProps, 'measurement' | 'measurementDisplay'> & {
color: string;
},
) {
const { color, ...rest } = props;
return (
<MeasurementPlot
measurement={irMeasurement}
measurementDisplay={{
color: { kind: 'fixed', color },
visible: true,
}}
{...rest}
/>
);
}

Control.args = {
Expand All @@ -27,6 +41,7 @@ Control.args = {
showHorizontalGrid: true,
showVerticalGrid: true,
flipHorizontalAxis: false,
color: 'red',
};

Control.argTypes = {
Expand Down

0 comments on commit 48ae20c

Please sign in to comment.