Day 26 - 实战演练 — Notifier 、Notification

https://ithelp.ithome.com.tw/upload/images/20211011/20120754pAx7xMVG5c.png

想先看 Code 或是 Demo 的由此去

Github Repo: ithelp-ui-demo/Notifier

Live Demo:** Notification**

Notifier

要做 Notification 前要先做 Notifier,把做一个新的 Root 的行为抽象化出来。

Typings

https://ithelp.ithome.com.tw/upload/images/20211011/2012075427ppSESU4H.png

CreateNotifier

https://ithelp.ithome.com.tw/upload/images/20211011/20120754k4Dl64KeGZ.png

NotifierManager

https://ithelp.ithome.com.tw/upload/images/20211011/20120754FgIBC8xRT6.png

Notification

这边一样是只有把 HTML 结构跟 JS、React 的逻辑实作出来,Tailwind CSS 的部分会等之後的实作都赶完後候补上的!

Interface / API

https://ithelp.ithome.com.tw/upload/images/20211011/20120754PRcjrUSis1.png

元件实作

https://ithelp.ithome.com.tw/upload/images/20211011/201207540h1cz8PJgL.png

Usage

<Button
  variant="contained"
  onClick={() => {
    Notification.add({
      title: 'Demo Title',
      children: 'Demo String',
    });
  }}
>
  add
</Button>

<<:  D-04-开始测试 ? mstest ? specflow

>>:  Android Studio初学笔记-Day26-ExpandableListVIew(2)

Day 6 - 用 canvas 复刻 小画家 直线

直线 在上一篇章我们学会提取点击时的位置,本篇章也会用到相同的 function,我们先将他移出。 ...

使用 State Hook (Day16)

使用 State Hook 的步骤 其实在前面文章写过几次 Hook ,其实动作也就三个。 宣告一个...

D23 - 用 Swift 和公开资讯,打造投资理财的 Apps { 台股成交量实作.3 }

在 KLineViewController 开出的 volumeDataSet 会在 parent ...

[Golang]宣告变数的方式

第一种: 基本变数宣告 package main import "fmt" fu...

Day 7 - [Zenbo开发系列] 04-DDE简介

这篇主要是我之前看官方文件的笔记,还有对於几个 Basic Concepts 的理解,可能比较没有结...