Browse Source
fix: anchor add prefixCls (#33085)
Co-authored-by: undefined <undefined>
pull/33164/head
tangjinzhou
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
6 additions and
6 deletions
-
components/anchor/Anchor.tsx
-
components/anchor/__tests__/__snapshots__/demo.test.ts.snap
-
components/anchor/style/index.less
|
|
@ -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 = { |
|
|
|
|
|
@ -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" |
|
|
|
|
|
@ -50,7 +50,7 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
&.fixed &-ink &-ink-ball { |
|
|
|
&-fixed &-ink &-ink-ball { |
|
|
|
display: none; |
|
|
|
} |
|
|
|
|
|
|
|