Skip to content

Commit

Permalink
fix(InputButton): add title for InputButton (#1582)
Browse files Browse the repository at this point in the history
Co-authored-by: Zhang Rui <zhangrui@growingio.com>
  • Loading branch information
Ryan Zhang and Zhang Rui authored Dec 1, 2021
1 parent 4a330d5 commit 9acab96
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/input/InputButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ const InputButton = React.forwardRef<HTMLInputElement, InputButtonProps>((props,
type="button"
// when set Input type=button, the placeholder is invalid
value={value || placeholder}
title={value as string}
onChange={onChange}
prefix={customizePrefix}
suffix={suffix}
Expand Down
8 changes: 4 additions & 4 deletions src/popover/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
&[data-popper-placement^='top'] {
margin-bottom: 10px;
& > .@{popover-arrow-prefix-cls} {
bottom: -4px;
bottom: -3px;
background: @popover-background-color;
&::before {
border-right: 1px solid @popover-border-color;
Expand All @@ -34,7 +34,7 @@
&[data-popper-placement^='bottom'] {
margin-top: 10px;
& > .@{popover-arrow-prefix-cls} {
top: -5px;
top: -4px;
background: @popover-background-color;
&::before {
border-top: 1px solid @popover-border-color;
Expand All @@ -46,7 +46,7 @@
&[data-popper-placement^='left'] {
margin-right: 10px;
& > .@{popover-arrow-prefix-cls} {
right: -4px;
right: -3px;
background: @popover-background-color;
&::before {
border-top: 1px solid @popover-border-color;
Expand All @@ -58,7 +58,7 @@
&[data-popper-placement^='right'] {
margin-left: 10px;
& > .@{popover-arrow-prefix-cls} {
left: -5px;
left: -4px;
background: @popover-background-color;
&::before {
border-bottom: 1px solid @popover-border-color;
Expand Down
2 changes: 1 addition & 1 deletion src/tooltip/demos/Tooltip.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default {

const Template: Story<TooltipProps> = (args) => (
<div style={{ display: 'flex', alignItems: 'center' }}>
<div style={{ width: '610px', margin: '70px 0px' }}>
<div style={{ width: '610px', margin: '70px 120px' }}>
<div className="tooltip-top">
<span className="popover-wrapper">
<Tooltip {...args} placement="topLeft">
Expand Down

1 comment on commit 9acab96

@vercel
Copy link

@vercel vercel bot commented on 9acab96 Dec 1, 2021

Choose a reason for hiding this comment

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

Please sign in to comment.