Admin
The Admin component should wrap all the components used in the Admin Interface, which are:
It manages authentication and renders the Admin menu. It acts also as a Provider for the AdminContext, making it available to the wrapped components.
Props
interface AdminProps {
isLogin?: boolean
isPublicDesignSystem?: boolean
designSystemTitle?: string
}
Properties definition
Property | Definition |
---|---|
isLogin | Default false . It is boolean value to identify the Login page. It is needed to correctly manage the authentication process. |
isPublicDesignSystem | If true, the playground is accessible without authentication, in order to use it as a public design system documentation. |
designSystemTitle | Title to show in the playground page, if it is a public design system page. |
Usage example, editor page
import React from 'react'
import { Admin, Editor } from 'react-bricks'
const EditorPage = () => {
return (
<Admin>
<Editor />
</Admin>
)
}
export default EditorPage
Usage example, login page
import React from 'react'
import { Admin, Login } from 'react-bricks'
const LoginPage = () => {
return (
<Admin isLogin>
<Login />
</Admin>
)
}
export default LoginPage