Browse Source

fix: anchor add prefixCls (#33085)

Co-authored-by: undefined <undefined>
pull/33164/head
tangjinzhou 3 years ago
committed by GitHub
parent
commit
ea7c41b90a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      components/anchor/Anchor.tsx
  2. 8
      components/anchor/__tests__/__snapshots__/demo.test.ts.snap
  3. 2
      components/anchor/style/index.less

2
components/anchor/Anchor.tsx

@ -291,7 +291,7 @@ export default class Anchor extends React.Component<AnchorProps, AnchorState, Co
);
const anchorClass = classNames(prefixCls, {
fixed: !affix && !showInkInFixed,
[`${prefixCls}-fixed`]: !affix && !showInkInFixed,
});
const wrapperStyle = {

8
components/anchor/__tests__/__snapshots__/demo.test.ts.snap

@ -86,7 +86,7 @@ exports[`renders ./components/anchor/demo/customizeHighlight.md correctly 1`] =
style="max-height:100vh"
>
<div
class="ant-anchor fixed"
class="ant-anchor ant-anchor-fixed"
>
<div
class="ant-anchor-ink"
@ -160,7 +160,7 @@ exports[`renders ./components/anchor/demo/onChange.md correctly 1`] = `
style="max-height:100vh"
>
<div
class="ant-anchor fixed"
class="ant-anchor ant-anchor-fixed"
>
<div
class="ant-anchor-ink"
@ -234,7 +234,7 @@ exports[`renders ./components/anchor/demo/onClick.md correctly 1`] = `
style="max-height:100vh"
>
<div
class="ant-anchor fixed"
class="ant-anchor ant-anchor-fixed"
>
<div
class="ant-anchor-ink"
@ -308,7 +308,7 @@ exports[`renders ./components/anchor/demo/static.md correctly 1`] = `
style="max-height:100vh"
>
<div
class="ant-anchor fixed"
class="ant-anchor ant-anchor-fixed"
>
<div
class="ant-anchor-ink"

2
components/anchor/style/index.less

@ -50,7 +50,7 @@
}
}
&.fixed &-ink &-ink-ball {
&-fixed &-ink &-ink-ball {
display: none;
}

Loading…
Cancel
Save