AFFiNE/packages/frontend
CatsJuice d412635f6b
feat(component): new hook to open confirm modal (#6342)
new exports from `@affine/component`:
```ts
import { ConfirmModalProvider, useConfirmModal } from "@affine/component"
```

Open confirm modal with hook:

```ts
const Component = () => {
  const { openConfirmModal } = useConformModal();

  const open = () => {
    openConfirmModal({
      // props of ConfirmModal
      /**
       * will show loading state when confirm clicked, and close after onConfirm finished
       */
      onConfirm: async () => {
        await new Promise((r) => setTimeout(r, 2000));
      },
    });
  }
  return <Button onClick={open}>Open</Button>
}
```
2024-03-27 13:30:30 +00:00
..
component feat(component): new hook to open confirm modal (#6342) 2024-03-27 13:30:30 +00:00
core feat(component): new hook to open confirm modal (#6342) 2024-03-27 13:30:30 +00:00
electron fix(core): opt out telemetry if it was set to false (#6335) 2024-03-27 04:36:09 +00:00
electron-api feat(electron): add isMaximized flag to html (#6199) 2024-03-20 13:20:19 +00:00
graphql chore: improve password error message (#6255) 2024-03-26 07:15:06 +00:00
i18n chore: improve password error message (#6255) 2024-03-26 07:15:06 +00:00
native chore: bump base version to 0.14.0 (#6170) 2024-03-19 02:34:18 +00:00
templates test(server): auth tests (#6135) 2024-03-26 02:24:17 +00:00
web fix(core): opt out telemetry if it was set to false (#6335) 2024-03-27 04:36:09 +00:00
workspace-impl style: enable import-x/no-duplicates (#6279) 2024-03-25 03:55:33 +00:00