Skip to content

Commit

Permalink
fix(Header): enableNew を隠す (#5140)
Browse files Browse the repository at this point in the history
  • Loading branch information
uknmr authored Nov 27, 2024
1 parent 2989699 commit d8168f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 36 deletions.
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.あり,
},
}

0 comments on commit d8168f8

Please sign in to comment.