---
name: Notice
---

import {Playground, PropsTable} from 'docz'

import Notice from '.'
import Button from '../Button'

# Notice

<Playground>
  <Notice.Provider component={({children}) => <div>Hello {children}</div>}>
    <Notice.Consumer>
      {({add}) => (
        <Button onClick={() => add({
          children: ({remove}) => <div>Some message <Button onClick={remove}>Close</Button></div>
        })}>Create notification</Button>
      )}
    </Notice.Consumer>
  </Notice.Provider>
</Playground>
