Skip to content

Commit

Permalink
feat: ellipsis title
Browse files Browse the repository at this point in the history
  • Loading branch information
hemengke1997 committed Jul 24, 2021
1 parent f907ffb commit 065fbc8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/ResizableHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const AntdResizableHeader: React.FC<ComponentProp> = (props) => {
>
<div style={{ width: resizeWidth, height: '100%' }}></div>
</Resizable>
<div {...rest}></div>
<div {...rest} className="resizable-title"></div>
</th>
);
};
Expand Down
12 changes: 9 additions & 3 deletions src/index.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@import "react-resizable/css/styles.css";

@import 'react-resizable/css/styles.css';

.resizable-container {
position: relative;
Expand Down Expand Up @@ -28,7 +27,8 @@
transition: background-color 0.2s;
}

&:active, &:hover {
&:active,
&:hover {
cursor: col-resize;

& .resizable-line {
Expand All @@ -42,4 +42,10 @@
height: 100%;
}
}

& .resizable-title {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
}

0 comments on commit 065fbc8

Please sign in to comment.