Skip to content

Commit

Permalink
Merge pull request #1003 from shawnrivers/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
shawnrivers authored Oct 2, 2020
2 parents d30f33c + 1a8abae commit e175546
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/**@jsx jsx */
import { jsx } from '@emotion/core';
import * as React from 'react';
import { Meta, Story } from '@storybook/react/types-6-0';
import { Sidebar, SidebarProps } from '.';
import { ThemeDecorator } from 'storybook/ThemeDecorator';
import { BaseButton } from 'client/components/atoms/BaseButton';
import { Typography } from 'client/components/atoms/Typography';

export default {
title: 'Common/SideBar',
decorators: [ThemeDecorator()],
component: Sidebar,
} as Meta<SidebarProps>;

const Template: Story<SidebarProps> = () => {
const [isSidebarOpen, toggleSidebar] = React.useState(false);

return (
<div>
<BaseButton
onClick={() => toggleSidebar(true)}
horizontalPadding="l"
verticalPadding="l"
>
<Typography variant="h4" element="span">
Toggle Sidebar
</Typography>
</BaseButton>
<Sidebar open={isSidebarOpen} onClose={() => toggleSidebar(false)} />
</div>
);
};

export const Default = Template.bind({});
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,13 @@ const NavigationItem: React.FC<Omit<SidebarItemProps, 'element'>> = props => {

const transition = { duration: 0.2 };

export const Sidebar: React.FC<{
export type SidebarProps = {
open: boolean;
onClose: () => void;
className?: string;
}> = props => {
};

export const Sidebar: React.FC<SidebarProps> = props => {
const theme = useAppTheme();
const { getTranslation } = useTranslations();
const { open, onClose } = props;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { ThemeDecorator } from 'storybook/ThemeDecorator';
import { PositionType } from 'server/actors/Members/constants/position';

export default {
title: 'Position/badge',
title: 'Position/PositionBadge',
decorators: [ThemeDecorator()],
component: PositionBadge,
} as Meta<PositionBadgeProps>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
} from 'client/features/Member/components/PositionCounter';

export default {
title: 'Position/counter',
title: 'Position/PositionCounter',
component: PositionCounter,
decorators: [ThemeDecorator()],
} as Meta<PositionCounterProps>;
Expand Down
4 changes: 4 additions & 0 deletions src/data/members.json
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@
"bloodType": "b",
"origin": "埼玉県",
"sites": [
{
"title": "Instagram",
"url": "https://www.instagram.com/manatsu.akimoto_official/"
},
{
"title": "blog",
"url": "https://blog.nogizaka46.com/manatsu.akimoto/"
Expand Down
4 changes: 4 additions & 0 deletions src/server/actors/Members/raw/editor/firstGen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ export const FIRST_GEN_MEMBERS: MemberRaw[] = [
bloodType: BloodType.B,
origin: Birthplace.Saitama,
sites: [
{
title: SocialMedia.Instagram,
url: 'https://www.instagram.com/manatsu.akimoto_official/',
},
{
title: SocialMedia.Blog,
url: 'https://blog.nogizaka46.com/manatsu.akimoto/',
Expand Down

0 comments on commit e175546

Please sign in to comment.