Allow HTML, add language picker

Utilizes code from Mastodon LanguageDropdown: https://github.com/mastodon/mastodon/blob/main/app/javascript/mastodon/features/compose/components/language_dropdown.jsx

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak
2024-05-15 23:47:11 +02:00
parent 4ceef0fe81
commit 2e43f8967f
11 changed files with 444 additions and 15 deletions

View File

@ -10,7 +10,7 @@ import type { ButtonSizes, ButtonThemes } from './useButtonStyles';
interface IButton extends Pick<
React.ComponentProps<'button'>,
'children' | 'className' | 'disabled' | 'onClick' | 'onMouseDown' | 'onKeyDown' | 'title' | 'type'
'children' | 'className' | 'disabled' | 'onClick' | 'onMouseDown' | 'onKeyDown' | 'onKeyPress' | 'title' | 'type'
> {
/** Whether this button expands the width of its container. */
block?: boolean;

View File

@ -18,17 +18,17 @@ const alignItemsOptions = {
};
const spaces = {
0: 'gap-x-0',
[0.5]: 'gap-x-0.5',
1: 'gap-x-1',
1.5: 'gap-x-1.5',
2: 'gap-x-2',
2.5: 'gap-x-2.5',
3: 'gap-x-3',
4: 'gap-x-4',
5: 'gap-x-5',
6: 'gap-x-6',
8: 'gap-x-8',
0: 'gap-0',
[0.5]: 'gap-0.5',
1: 'gap-1',
1.5: 'gap-1.5',
2: 'gap-2',
2.5: 'gap-2.5',
3: 'gap-3',
4: 'gap-4',
5: 'gap-5',
6: 'gap-6',
8: 'gap-8',
};
interface IHStack extends Pick<React.HTMLAttributes<HTMLDivElement>, 'children' | 'className' | 'onClick' | 'style' | 'title'> {