Skip to content

Commit 211f4fe

Browse files
authoredMar 16, 2022
style(Transfer): 添加穿梭箭头边框样式 (#673)
1 parent f1ec501 commit 211f4fe

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed
 

‎packages/react-transfer/src/index.tsx

+11-12
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,15 @@ function Transfer(props: TransferProps) {
156156
props.onSearch?.('right', searchValue);
157157
};
158158

159+
const Arrow = (props: { click: () => void; style: React.CSSProperties }) => (
160+
<Icon
161+
onClick={() => props.click()}
162+
type="down-square-o"
163+
className={`${prefixCls}-arrow`}
164+
style={{ fontSize: 20, stroke: '#e9e9e9', fill: '#333', ...props.style }}
165+
/>
166+
);
167+
159168
return (
160169
<div className={cls} style={{ width: 400, ...style }}>
161170
<Card
@@ -181,18 +190,8 @@ function Transfer(props: TransferProps) {
181190
</div>
182191
</Card>
183192
<div className={`${prefixCls}-arrow-content`}>
184-
<Icon
185-
onClick={() => transferClick('left')}
186-
type="down-square-o"
187-
className={`${prefixCls}-arrow-left`}
188-
style={{ transform: 'rotate(-90deg)', fontSize: 20 }}
189-
/>
190-
<Icon
191-
onClick={() => transferClick('right')}
192-
type="down-square-o"
193-
className={`${prefixCls}-arrow-right`}
194-
style={{ transform: 'rotate(90deg)', fontSize: 20 }}
195-
/>
193+
<Arrow click={() => transferClick('left')} style={{ transform: 'rotate(90deg)' }} />
194+
<Arrow click={() => transferClick('right')} style={{ transform: 'rotate(-90deg)' }} />
196195
</div>
197196
<Card
198197
bodyStyle={{ padding: 5 }}

‎packages/react-transfer/src/style/index.less

+5-4
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,13 @@
2222
justify-content: space-between;
2323
}
2424

25-
&-arrow-left,
26-
&-arrow-right {
25+
&-arrow {
26+
transition: all 0.3s;
27+
border-radius: 3px;
28+
2729
&:hover {
2830
cursor: pointer;
29-
border-radius: 3px;
30-
box-shadow: 0 0 0 1px #6e6e6e, 0 0 0 1px rgba(57, 62, 72, 0), inset 0 1px 1px rgba(16, 22, 26, 0.2);
31+
box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
3132
}
3233
}
3334
}

0 commit comments

Comments
 (0)
Please sign in to comment.