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

docs: Input と CurrencyInput、SearchInput の Story を見直し #5029

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

uknmr
Copy link
Contributor

@uknmr uknmr commented Oct 18, 2024

関連URL

概要

#4949 の方針に沿って Input や CurrencyInput、SearchInput の Story を見直しました。

変更内容

  • Input と VRT 向け Input の Story を見直し
  • CurrencyInput の Story を見直し
    • 中身が Input のため VRT は不要だと判断しました
  • SearchInput を VRT 向け SearchInput の Story を見直し

確認方法

Storybook や Chromatic で確認してください。

@uknmr uknmr requested a review from a team as a code owner October 18, 2024 05:50
React.ComponentProps<typeof Input>,
'type' | 'value' | 'defaultValue' | 'placeholder'
> & {
type Props = Omit<React.ComponentProps<typeof Input>, 'type' | 'value' | 'defaultValue'> & {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

placeholder は Input で定義されていたので消しました。


const VRT = {}

export const VRTHover: StoryObj<typeof SearchInput> = {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addon-pseudo-states では再現できなさそうだったため play function を利用(focus も同じ

Copy link

pkg-pr-new bot commented Oct 18, 2024

Open in Stackblitz

pnpm add https://pkg.pr.new/kufu/smarthr-ui@5029

commit: 973bdc6

subcomponents: { CurrencyInput, SearchInput },
// eslint-disable-next-line smarthr/a11y-input-in-form-control
render: (args) => <Input {...args} />,
args: {},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ReactNode を受けると props についてはデフォ値を設定するか、args の型を定義しないと Playground で [Set Object] 押下するとクラッシュしちゃいますね…。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

対応しました! 973bdc6

Copy link
Contributor

@s-sasaki-0529 s-sasaki-0529 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

各コンポーネントでPlayground が使えない状態になっちゃってるのでご確認お願いします!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants