Skip to content

Commit

Permalink
fix: extra foot miss style (#738)
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieJ authored Jan 12, 2024
1 parent 6fef569 commit ac75954
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/PickerInput/Popup/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export default function Footer(props: FooterProps) {

return (
<div className={`${prefixCls}-footer`}>
{extraNode}
{extraNode && <div className={`${prefixCls}-footer-extra`}>{extraNode}</div>}
{rangeNode}
</div>
);
Expand Down
16 changes: 0 additions & 16 deletions src/utils/getExtraFooter.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion tests/picker.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ describe('Picker.Basic', () => {
);

function matchFooter(mode: string) {
expect(document.querySelector('.rc-picker-footer').textContent).toEqual(mode);
expect(document.querySelector('.rc-picker-footer-extra').textContent).toEqual(mode);
expect(renderExtraFooter.mock.calls[renderExtraFooter.mock.calls.length - 1][0]).toEqual(
mode,
);
Expand Down
2 changes: 1 addition & 1 deletion tests/range.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ describe('Picker.Range', () => {
<DayRangePicker renderExtraFooter={() => <p>footer</p>} picker="year" />,
);
openPicker(container);
expect(document.querySelector('.rc-picker-footer').textContent).toEqual('footer');
expect(document.querySelector('.rc-picker-footer-extra').textContent).toEqual('footer');
expect(document.querySelectorAll('.rc-picker-header-view')[0].textContent).toEqual(
'1990年-1999年',
);
Expand Down

1 comment on commit ac75954

@vercel
Copy link

@vercel vercel bot commented on ac75954 Jan 12, 2024

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.