import React from "react"; import { RbcsMpaObjectiveStatus } from "./RbcsMpaObjectiveStatus.js"; import { ReportDecorator, CardDecorator, } from "../../components/storybook/index.js"; import { percentWithEdge, getKeys } from "../../helpers/index.js"; import { RbcsObjective, RbcsMpaProtectionLevel } from "../types.js"; import { OBJECTIVE_YES, OBJECTIVE_NO } from "../../types/index.js"; export default { component: RbcsMpaObjectiveStatus, title: "Components/Rbcs/RbcsMpaObjective", decorators: [CardDecorator, ReportDecorator], }; const objective: RbcsObjective = { objectiveId: "eez", shortDesc: "30% protected", target: 0.3, countsToward: { "Fully Protected Area": "yes", "Highly Protected Area": "yes", "Moderately Protected Area": "maybe", "Poorly Protected Area": "no", "Unprotected Area": "no", }, }; export const simple = () => { const levels = getKeys(objective.countsToward); return ( <>
Based on the following objective {JSON.stringify(objective)}:
{levels.map((level, index) => ({`If MPA has protection level: ${level}`}
Based on the following objective {JSON.stringify(objective)}:
{levels.map((level, index) => ({`If MPA has protection level: ${level}`}