Skip to content

Commit

Permalink
Fix stories
Browse files Browse the repository at this point in the history
Signed-off-by: Kipruto <[email protected]>
  • Loading branch information
kelvinkipruto committed Aug 1, 2024
1 parent 92482bb commit b176ac6
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function Chart({

setView(newView.view);
} catch (error) {
console.error(error);
console.error("Error rendering chart", error);

Check warning on line 107 in apps/climatemappedafrica/src/components/HURUmap/Chart/index.js

View workflow job for this annotation

GitHub Actions / Build and Test (20.16, ubuntu-latest)

Unexpected console statement
}
}
}
Expand Down
7 changes: 5 additions & 2 deletions apps/uibook/stories/hurumap/core/Download.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ Default.args = {
handleChartValueChange: () => {},
height: 100,
isAction: true,
imageTypes: ["PNG", "JPEG", "SVG"],
layouts: ["Default"],
imageTypes: ["PNG", "SVG"],
layouts: ["Layout 1", "Layout 2"],
projectlogo: null,
profileNames: [],
scaleFactor: 2,
Expand All @@ -35,4 +35,7 @@ Default.args = {
title: "Download",
values: [],
view: null,
sx: {
width: 200,
},
};
47 changes: 47 additions & 0 deletions apps/uibook/stories/hurumap/core/IndicatorTitle.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import { IndicatorTitle } from "@hurumap/core";
import DownloadIcon from "@mui/icons-material/Download";
import InfoIcon from "@mui/icons-material/Info";
import ShareIcon from "@mui/icons-material/Share";
import React from "react";

export default {
title: "@hurumap/core/IndicatorTitle",
component: IndicatorTitle,
};

function Template(args) {
return <IndicatorTitle {...args} />;
}

export const Default = Template.bind({});

Default.args = {
children: <span>Area of agricultural land in hectares</span>,
description: "Area of agricultural land by main purpose is in Hectares.",
disableToggle: false,
title: "Area of agricultural land in hectares",
view: {},
actions: [
{
id: "act-description",
title: "Description",
header: "Learn More",
children: <span>Learn More</span>,
icon: <InfoIcon />,
},
{
id: "act-download",
title: "Download",
header: "Download",
children: <span>Download</span>,
icon: <DownloadIcon />,
},
{
id: "act-share",
title: "Share",
header: "Share",
children: <span>Share</span>,
icon: <ShareIcon />,
},
],
};

0 comments on commit b176ac6

Please sign in to comment.