-
Notifications
You must be signed in to change notification settings - Fork 10
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
ItemEmptyのemptyStateIconを外部から設定できるようにする #157
Conversation
emptyTitle?: string; | ||
emptySubtitle?: string; | ||
emptyImage?: string; | ||
emptyImageWidth?: number; | ||
emptyImageHeight?: number; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
この辺は単一のオブジェクトで良いかもしれないですね。
// ↓<ItemEmpty />のprops
type ItemEmptyProps = {
title?: string;
subtitle?: string;
emptyImage?: string;
imageWidth?: number;
imageHeight?: number;
};
ただ破壊的変更になるので
- とりあえず追加分のpropsだけオブジェクトで渡せるようにする
- 残りの
emptyTitle
,emptySubTitle
もオブジェクトに含める旨のIssueを書いて、同様の破壊的変更Issueと一緒に片付ける
みたいにするのが良さそうな気がしています!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
承知しました!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTMです!
Issueは「ガーデニング」ラベルで良い気がしています!!
// TODO: emptyTitle と emptySubtitle もここに移す | ||
type ItemEmptyProps = { | ||
emptyImage?: string; | ||
imageWidth?: number; | ||
imageHeight?: number; | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
今は別ですが、最終的にはItemEmpty.tsxからpropsをimportするイメージです!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
了解です!またsubtitleなどをオブジェクトに追加したときに合わせてimportしますね!
close #155