You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
836 B
42 lines
836 B
import React from 'react';
|
|
import { Anchor } from 'antd';
|
|
|
|
const getCurrentAnchor = () => '#components-anchor-demo-static';
|
|
|
|
const App: React.FC = () => (
|
|
<Anchor
|
|
affix={false}
|
|
getCurrentAnchor={getCurrentAnchor}
|
|
items={[
|
|
{
|
|
key: '1',
|
|
href: '#components-anchor-demo-basic',
|
|
title: 'Basic demo',
|
|
},
|
|
{
|
|
key: '2',
|
|
href: '#components-anchor-demo-static',
|
|
title: 'Static demo',
|
|
},
|
|
{
|
|
key: '3',
|
|
href: '#api',
|
|
title: 'API',
|
|
children: [
|
|
{
|
|
key: '4',
|
|
href: '#anchor-props',
|
|
title: 'Anchor Props',
|
|
},
|
|
{
|
|
key: '5',
|
|
href: '#link-props',
|
|
title: 'Link Props',
|
|
},
|
|
],
|
|
},
|
|
]}
|
|
/>
|
|
);
|
|
|
|
export default App;
|
|
|