@admui/link
v0.3.0
Published
```jsx import { MemoryRouter } from 'react-router-dom' import { PlainRouteItem, PlainItem } from '@admui/navigation' import { ThemeProvider } from '@admui/theme' import { Panel } from '@admui/panel' import { Link, RouteLink } from '@admui/link'
Downloads
10
Readme
import { MemoryRouter } from 'react-router-dom'
import { PlainRouteItem, PlainItem } from '@admui/navigation'
import { ThemeProvider } from '@admui/theme'
import { Panel } from '@admui/panel'
import { Link, RouteLink } from '@admui/link'
;<ThemeProvider>
<MemoryRouter>
<div style={{ width: '100%', height: 250 }}>
<Panel>
<div style={{ padding: 20 }}>
<Link href={window.location.href}>
Ссылка
</Link>
</div>
<div style={{ padding: 20 }}>
<RouteLink to='/some'>
Ссылка роутера
</RouteLink>
</div>
</Panel>
</div>
</MemoryRouter>
</ThemeProvider>
import { MemoryRouter } from 'react-router-dom'
import { PlainRouteItem, PlainItem } from '@admui/navigation'
import { ThemeProvider } from '@admui/theme'
import { Row, Layout } from '@admui/layout'
import { Panel } from '@admui/panel'
import { Link, RouteLink, NavLink } from '@admui/link'
;<ThemeProvider>
<MemoryRouter initialEntries={['/a']}>
<div style={{ width: '100%', height: 250 }}>
<Panel>
<div style={{ padding: 40, height: 40 }}>
<Row fill>
<Layout>
<NavLink to='/a'>
Пункт 1
</NavLink>
</Layout>
<Layout basis={16} />
<Layout>
<NavLink to='/b'>
Пункт 2
</NavLink>
</Layout>
</Row>
</div>
</Panel>
</div>
</MemoryRouter>
</ThemeProvider>