Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Header): enableNew を隠す #5140

Merged
merged 1 commit into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/smarthr-ui/src/components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ type Props = {
currentTenantId?: string
/** テナントが選択された時に発火するコールバック関数 */
onTenantSelect?: (id: string) => void
/** @deprecated internal-ui から利用するので使わないでください。 */
enableNew?: boolean
} & VariantProps<typeof header>

type ElementProps = Omit<ComponentProps<'header'>, keyof Props>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import { action } from '@storybook/addon-actions'
import React from 'react'

import { FaRegCircleQuestionIcon } from '../../Icon'
import { Stack } from '../../Layout'
import { Header } from '../Header'
import { HeaderDropdownMenuButton } from '../HeaderDropdownMenuButton'
import { HeaderLink } from '../HeaderLink'
import { LanguageSwitcher } from '../LanguageSwitcher'

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

Expand Down Expand Up @@ -115,6 +113,7 @@ export default {
options: Object.keys(_childrenOptions),
mapping: _childrenOptions,
},
enableNew: { control: false },
},
args: {},
parameters: {
Expand Down Expand Up @@ -175,37 +174,3 @@ export const Children: StoryObj<typeof Header> = {
children: _childrenOptions.あり,
},
}

export const EnableNew: StoryObj<typeof Header> = {
name: 'enableNew',
render: ({ enableNew, ...rest }) => (
<Header {...rest} enableNew={enableNew}>
<HeaderLink
href="https://support.smarthr.jp"
prefix={<FaRegCircleQuestionIcon />}
enableNew={enableNew}
>
ヘルプ
</HeaderLink>
<LanguageSwitcher
locale="ja"
localeMap={{
ja: '日本語',
'en-us': 'English',
pt: 'Português',
vi: 'Tiếng Việt',
ko: '한국어',
'zh-cn': '简体中文',
'zh-tw': '繁體中文',
}}
onLanguageSelect={action('selected')}
enableNew
/>
</Header>
),
args: {
enableNew: true,
featureName: '基本機能',
apps: _appsOptions.あり,
},
}