Skip to content

Commit

Permalink
Merge pull request #377 from uyupun/feat/355_vision
Browse files Browse the repository at this point in the history
Visionコンポーネントの作成
  • Loading branch information
takashi0602 authored Mar 27, 2024
2 parents 1a1cbad + 6b18afb commit 4782027
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/components/domain/Vision/index.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { Vision as DomainVision } from '.';

import type { Meta, StoryObj } from '@storybook/react';

const meta: Meta<typeof DomainVision> = {
title: 'Domain/Vision',
component: DomainVision,
};
export default meta;

type Story = StoryObj<typeof DomainVision>;
export const Vision: Story = {
render: () => (
<DomainVision
description="クリック一つで求める情報にアクセスできる時代は到来しました。これからの時代に求められるのは、スワイプ一つでいかに高い顧客体験を提供できるか、だと確信しています。"
title="スワイプ一つで笑みが溢れる世界"
/>
),
};
40 changes: 40 additions & 0 deletions src/components/domain/Vision/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { Heading } from '@/components/base/Heading';
import { Text } from '@/components/base/Text';

import { styles } from './styles.css';

import type { FC } from 'react';

type Props = {
/**
* ビジョンのタイトル
*/
title: string;
/**
* ビジョンの説明
*/
description: string;
};

const Vision: FC<Props> = ({ title, description }) => {
return (
<section className={styles.section}>
<Heading className={styles.heading} tagName="h2">
Vision
</Heading>
<Text
className={styles.title}
fontSize={{ mobile: 20, desktop: 36 }}
lineHeight={1.3}
tagName="p"
>
<strong className={styles.strong}>{title}</strong>
</Text>
<Text className={styles.description} tagName="p">
{description}
</Text>
</section>
);
};

export { Vision };
27 changes: 27 additions & 0 deletions src/components/domain/Vision/styles.css.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { sprinkles } from '@/styles/sprinkles.css';

const styles = {
section: sprinkles({
textAlign: 'center',
}),
heading: sprinkles({
marginBottom: {
mobile: 6,
desktop: 10,
},
}),
title: sprinkles({
marginBottom: {
mobile: 3,
desktop: 5,
},
}),
strong: sprinkles({
fontWeight: 'bold',
}),
description: sprinkles({
textAlign: 'left',
}),
};

export { styles };

0 comments on commit 4782027

Please sign in to comment.