Skip to content

Commit

Permalink
Merge branch 'master' into fix-page-counter-type
Browse files Browse the repository at this point in the history
  • Loading branch information
s-sasaki-0529 authored Jun 14, 2024
2 parents 44805b5 + 953d689 commit 24fc89c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 76 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { StoryFn } from '@storybook/react'
import React from 'react'

import { Footer } from './Footer'
import { Text } from '../Text'

import { ErrorScreen } from '.'

Expand All @@ -13,42 +13,29 @@ export default {
},
}

export const Full: StoryFn = () => (
export const All: StoryFn = () => (
<ErrorScreen
title="SmartHR は現在メンテナンス中です"
className="shr-w-full"
title="タイトル"
links={[
{
label: 'SmartHR お知らせ',
url: 'http://example.com',
label: 'リンク1',
url: '/',
},
{
label: 'リンク2',
url: '/',
},
{
label: 'リンク3',
url: '/',
target: '_blank',
},
]}
>
<p>
いつも SmartHR をご利用いただきありがとうございます。
<br />
ただいまメンテナンスのため、一時サービスを停止しております。
<br />
ご迷惑をおかけいたしますが、ご理解のほどよろしくお願いいたします。
</p>
<Text as="p" className="shr-text-center">
メッセージ
</Text>
</ErrorScreen>
)
Full.storyName = 'full'

export const WithoutChildren: StoryFn = () => (
<ErrorScreen
title="サンプルタイトル"
links={[
{
label: 'ホームへ',
url: 'http://example.com',
},
]}
/>
)
WithoutChildren.storyName = 'without children'

export const WithFooter: StoryFn = () => (
<ErrorScreen links={[{ label: 'ホームへ', url: 'http://example.com' }]} footer={<Footer />} />
)
WithFooter.storyName = 'with footer'
All.storyName = 'all'
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ type Props = {
}>
/** 表示するコンテンツ */
children?: ReactNode
/** フッター */
footer?: ReactNode
/** コンポーネントに適用するクラス名 */
className?: string
}
Expand All @@ -41,7 +39,6 @@ export const ErrorScreen: FC<Props & ElementProps> = ({
title,
links,
children,
footer,
className,
...props
}) => {
Expand Down Expand Up @@ -79,8 +76,6 @@ export const ErrorScreen: FC<Props & ElementProps> = ({
)}
</Stack>
</Stack>

{footer && <div className="shr-self-stretch">{footer}</div>}
</Center>
)
}
40 changes: 0 additions & 40 deletions packages/smarthr-ui/src/components/ErrorScreen/Footer.tsx

This file was deleted.

0 comments on commit 24fc89c

Please sign in to comment.