docs: update draggable demo with rtl mode (#34785)

* docs: update draggable demo with rtl mode

* test: update tabs demo snapshot
This commit is contained in:
miracles1919 2022-03-31 14:06:44 +08:00 committed by GitHub
parent f5c6379bba
commit 550f60ff76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 13 deletions

View File

@ -945,8 +945,7 @@ exports[`renders ./components/tabs/demo/custom-tab-bar-node.md extend context co
style="transform:translate(0px, 0px)" style="transform:translate(0px, 0px)"
> >
<div <div
class="" class="dragnode "
style="margin-right:24px"
> >
<div <div
class="ant-tabs-tab ant-tabs-tab-active" class="ant-tabs-tab ant-tabs-tab-active"
@ -962,8 +961,7 @@ exports[`renders ./components/tabs/demo/custom-tab-bar-node.md extend context co
</div> </div>
</div> </div>
<div <div
class="" class="dragnode "
style="margin-right:24px"
> >
<div <div
class="ant-tabs-tab" class="ant-tabs-tab"
@ -979,8 +977,7 @@ exports[`renders ./components/tabs/demo/custom-tab-bar-node.md extend context co
</div> </div>
</div> </div>
<div <div
class="" class="dragnode "
style="margin-right:24px"
> >
<div <div
class="ant-tabs-tab" class="ant-tabs-tab"

View File

@ -831,8 +831,7 @@ exports[`renders ./components/tabs/demo/custom-tab-bar-node.md correctly 1`] = `
style="transform:translate(0px, 0px)" style="transform:translate(0px, 0px)"
> >
<div <div
class="" class="dragnode "
style="margin-right:24px"
> >
<div <div
class="ant-tabs-tab ant-tabs-tab-active" class="ant-tabs-tab ant-tabs-tab-active"
@ -848,8 +847,7 @@ exports[`renders ./components/tabs/demo/custom-tab-bar-node.md correctly 1`] = `
</div> </div>
</div> </div>
<div <div
class="" class="dragnode "
style="margin-right:24px"
> >
<div <div
class="ant-tabs-tab" class="ant-tabs-tab"
@ -865,8 +863,7 @@ exports[`renders ./components/tabs/demo/custom-tab-bar-node.md correctly 1`] = `
</div> </div>
</div> </div>
<div <div
class="" class="dragnode "
style="margin-right:24px"
> >
<div <div
class="ant-tabs-tab" class="ant-tabs-tab"

View File

@ -50,7 +50,7 @@ const DraggableTabNode = ({ index, children, moveNode }) => {
}); });
drop(drag(ref)); drop(drag(ref));
return ( return (
<div ref={ref} style={{ marginRight: 24 }} className={isOver ? dropClassName : ''}> <div ref={ref} className={`dragnode ${isOver ? dropClassName : ''}`}>
{children} {children}
</div> </div>
); );
@ -152,4 +152,8 @@ ReactDOM.render(
background: #fefefe; background: #fefefe;
transition: all 0.3s; transition: all 0.3s;
} }
.dragnode {
margin-inline-end: 24px;
}
``` ```