Skip to content

Commit

Permalink
feat(flat-component): design class picker component && adjust the dir…
Browse files Browse the repository at this point in the history
…ectory structure (netless-io#583)
  • Loading branch information
Cheerego7 authored and Leooeloel committed Apr 25, 2021
1 parent ef2f820 commit 0f6f65c
Show file tree
Hide file tree
Showing 20 changed files with 279 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { Meta, Story } from "@storybook/react";
import React, { useState } from "react";
import { ClassPicker, ClassPickerItemType, ClassPickerProps } from ".";

const storyMeta: Meta = {
title: "HomePage/ClassPicker",
component: ClassPicker,
parameters: {
backgrounds: {
default: "Homepage Background",
},

viewport: {
viewports: {
compact: {
name: "Compact Mode",
styles: { width: "556px", height: "611px" },
},
},
defaultViewport: "compact",
},
},
};

export default storyMeta;

export const Overview: Story<ClassPickerProps> = args => <ClassPicker {...args} />;
Overview.args = {
type: "oneToOne",
};

export const PlayableExample: Story<ClassPickerProps> = () => {
const [classType, setClassType] = useState<ClassPickerItemType>("oneToOne");
return <ClassPicker type={classType} onChange={setClassType} />;
};
PlayableExample.argTypes = {
type: {
control: false,
},
};
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 0f6f65c

Please sign in to comment.