Skip to content

Commit

Permalink
Stories Slider
Browse files Browse the repository at this point in the history
  • Loading branch information
severinlandolt committed Nov 4, 2023
1 parent 764e816 commit 7020e25
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/components/text-elements/Legend/Legend.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const ScrollButton = ({ icon, onClick, disabled }: ScrollButtonProps) => {
<button
type="button"
className={tremorTwMerge(
makeLegendClassName("legendScrollButton"),
makeLegendClassName("legendSliderButton"),
// common
"w-5 group inline-flex items-center truncate rounded-tremor-small transition",
disabled ? "cursor-not-allowed" : "ursor-pointer",
Expand Down
7 changes: 5 additions & 2 deletions src/stories/chart-elements/AreaChart.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,11 @@ export const RotateXLabels: Story = {
},
};

export const WithoutLegendScroll: Story = {
args: { enableLegendSlider: false },
export const LegendSlider: Story = {
args: {
enableLegendSlider: true,
categories: ["Sales", "Successful Payments", "Test"],
},
};

export const NoAxes: Story = {
Expand Down
4 changes: 2 additions & 2 deletions src/stories/chart-elements/BarChart.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ export const SingleAndMultipleDataAndOnValueChange: Story = {
args: { data: singleAndMultipleData, onValueChange: (v: any) => alert(JSON.stringify(v)) },
};

export const WithoutLegendScroll: Story = {
args: { enableLegendSlider: false },
export const LegendSlider: Story = {
args: { enableLegendSlider: true },
};

export const PreserveStartEnd: Story = {
Expand Down
4 changes: 2 additions & 2 deletions src/stories/chart-elements/LineChart.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ export const SingleAndMultipleDataAndOnValueChange: Story = {
args: { data: singleAndMultipleData, onValueChange: (v: any) => alert(JSON.stringify(v)) },
};

export const WithoutLegendScroll: Story = {
args: { enableLegendSlider: false },
export const LegendSlider: Story = {
args: { enableLegendSlider: true },
};
export const PreserveStartEnd: Story = {
args: { intervalType: "preserveStartEnd" },
Expand Down
4 changes: 2 additions & 2 deletions src/stories/chart-elements/ScatterChart.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ export const RichDataExample: Story = {
},
};

export const WithoutLegendScroll: Story = {
args: { enableLegendSlider: false },
export const LegendSlider: Story = {
args: { enableLegendSlider: true },
};

export const PreserveStartEnd: Story = {
Expand Down

0 comments on commit 7020e25

Please sign in to comment.