-
-
Notifications
You must be signed in to change notification settings - Fork 112
feat: support classnames and styles #376
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -134,6 +134,8 @@ const Preview: React.FC<PreviewProps> = props => { | |||||||||
| toolbarRender, | ||||||||||
| onTransform, | ||||||||||
| onChange, | ||||||||||
| classNames: imageClassNames, | ||||||||||
| styles, | ||||||||||
|
Comment on lines
+137
to
+138
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion 完善 PreviewProps 接口的类型定义 当前的类型定义不够严格,建议使用与 Image 组件相同的类型定义。 - classNames: imageClassNames,
- styles,
+ classNames?: Partial<Record<SemanticName, string>>;
+ styles?: Partial<Record<SemanticName, React.CSSProperties>>;📝 Committable suggestion
Suggested change
|
||||||||||
| ...restProps | ||||||||||
| } = props; | ||||||||||
|
|
||||||||||
|
|
@@ -339,6 +341,8 @@ const Preview: React.FC<PreviewProps> = props => { | |||||||||
| onReset={onReset} | ||||||||||
| zIndex={restProps.zIndex !== undefined ? restProps.zIndex + 1 : undefined} | ||||||||||
| image={image} | ||||||||||
| classNames={imageClassNames} | ||||||||||
| styles={styles} | ||||||||||
| /> | ||||||||||
| </> | ||||||||||
| ); | ||||||||||
|
|
||||||||||
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.
诶,actions 原来是 Preview 的?我还以为指的是 Image hover 是那个
👁 预览……