Components

useNotice

<useNotice />

Constructor

# <useNotice />

Hook which allows you to add notice message to the app.

import { useNotice, Button } from 'admin-bro'

const myComponent = () => {
  const sendNotice = useNotice()
  render (
    <Button onClick={() => sendNotice({ message: 'I am awesome' })}>I am awesome</Button>
  )
}

View Source admin-bro/src/frontend/hooks/use-notice.ts, line 21

Type Definitions

# AddNotice(notice)

Parameters:
Name Type Description
notice NoticeMessage

View Source admin-bro/src/frontend/hooks/use-notice.ts, line 30