forked from netless-io/flat
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(flat-component): design class picker component && adjust the dir…
…ectory structure (netless-io#583)
- Loading branch information
Showing
20 changed files
with
279 additions
and
4 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
packages/flat-components/src/components/HomePage/ClassPicker/ClassPicker.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
}, | ||
}; |
26 changes: 26 additions & 0 deletions
26
packages/flat-components/src/components/HomePage/ClassPicker/icons/big-class.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions
33
packages/flat-components/src/components/HomePage/ClassPicker/icons/one-to-one.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.