Skip to content

Commit

Permalink
perf: optimize cursor of messgae clickable
Browse files Browse the repository at this point in the history
  • Loading branch information
JeromeLin committed May 11, 2021
1 parent e4db8e2 commit 445a935
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Expand Up @@ -69,7 +69,7 @@ exports[`Message closable 1`] = `

exports[`Message hasArrow 1`] = `
<div
className="za-message za-message--primary"
className="za-message za-message--primary za-message--link"
onClick={[Function]}
>
<div
Expand Down
1 change: 1 addition & 0 deletions packages/zarm/src/message/index.tsx
Expand Up @@ -46,6 +46,7 @@ export default class Message extends PureComponent<MessageProps, MessageState> {
const classes = classnames(prefixCls, className, {
[`${prefixCls}--${theme}`]: !!theme,
[`${prefixCls}--${size}`]: !!size,
[`${prefixCls}--link`]: !!hasArrow,
});

const iconRender = icon && <div className={`${prefixCls}__icon`}>{icon}</div>;
Expand Down
5 changes: 4 additions & 1 deletion packages/zarm/src/message/style/component.scss
Expand Up @@ -19,7 +19,6 @@

@include b(icon) {
font-size: var(--message-icon-size-md);
cursor: pointer;
}
}

Expand All @@ -42,6 +41,10 @@
}
}

@include m(link) {
cursor: pointer;
}

@include m(primary) {
@include message-theme(var(--theme-primary));
}
Expand Down

0 comments on commit 445a935

Please sign in to comment.