CatsJuice
|
249f3471c9
|
feat(component): shortcut style for tooltip (#7721)

- New `shortcut` prop for `<Tooltip />`
- single key
```tsx
<Tooltip shortcut="T" />
```
- multiple
```tsx
<Tooltip shortcut={["⌘", "K"]} />
```
- Round tooltip's arrow
- Use new design system colors
- Replace some usage
- App sidebar switch
- Editor mode switch
- New tab (new)
|
2024-08-05 02:57:24 +00:00 |
|
CatsJuice
|
827c952e9f
|
refactor(component): new Radio component (#6910)
# New `RadioGroup` component to replace `RadioButton`

### what's new
- [x] Change the API
- [x] More customizable options
- [x] Indicator animation
- [x] Dynamic width support(responsive)
- [x] Storybook
- [x] JSDoc
|
2024-06-27 06:04:19 +00:00 |
|
CatsJuice
|
98e35384a6
|
feat(component): helper function observeResize to observe size change via global ResizeObserver (#7241)
```ts
import { observeResize } from "@affine/component";
useEffect(() => {
const dispose = observeResize(element entry => {
console.log(entry.contentRect);
});
return () => dispose();
}, []);
```
|
2024-06-19 09:04:56 +00:00 |
|