basic.md 456 Bytes
Newer Older
ddcat1115's avatar
ddcat1115 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
---
order: 0
title: 
  zh-CN: εŸΊη‘€
  en-US: Basic
---

Simplest of usage.

````jsx
import RenderAuthorized from 'ant-design-pro/lib/Authorized';
import { Alert } from 'antd';

const Authorized = RenderAuthorized('user');
const noMatch = <Alert message="No permission." type="error" showIcon />

ReactDOM.render(
  <Authorized authority='admin' noMatch={noMatch}>
    <Alert message="Passed!" type="success" showIcon />
  </Authorized>
, mountNode);
````