All files / projects-dev/apps/storybook/stories/Components Leaderboard.stories.ts

0% Statements 0/40
0% Branches 0/1
0% Functions 0/1
0% Lines 0/40

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41                                                                                 
import { Story, Meta } from "@storybook/html";
import "@jga/ui-leaderboard/public/build/bundle";

export default {
    title: "Components/Leaderboard",
} as Meta;

interface Properties {
    title: string;
    data: unknown[];
}

const Template: Story<Properties> = ({ title, data }) => {
    return `
        <jga-ui-leaderboard
            title="${title}"
            data='${JSON.stringify(data)}'
        >
        </jga-ui-leaderboard>
    `;
};

export const Default = Template.bind({});
Default.args = {
    title: "Best Movies",
    data: [
        {
            name: "Star Wars",
            value: "$460,935,665",
        },
        {
            name: "Howard The Duck",
            value: "$16,295,774",
        },
        {
            name: "Americam Graffiti",
            value: "$115,000,000",
        },
    ],
};