Profile editing: Rearranging and adding fields (#38083)
This commit is contained in:
17 files changed
+595
-43
No files matched your search
@@ -0,0 +1,29 @@
|
||||
import type { FC } from 'react';
|
||||
|
||||
import { EmojiHTML } from '@/mastodon/components/emoji/html';
|
||||
import type { useElementHandledLink } from '@/mastodon/components/status/handled_link';
|
||||
import type { FieldData } from '@/mastodon/reducers/slices/profile_edit';
|
||||
|
||||
import classes from '../styles.module.scss';
|
||||
|
||||
export const AccountField: FC<
|
||||
FieldData & Partial<ReturnType<typeof useElementHandledLink>>
|
||||
> = ({ onElement, ...field }) => {
|
||||
return (
|
||||
<>
|
||||
<EmojiHTML
|
||||
as='h2'
|
||||
htmlString={field.name}
|
||||
className={classes.fieldName}
|
||||
onElement={onElement}
|
||||
/>
|
||||
|
||||
<EmojiHTML
|
||||
as='p'
|
||||
htmlString={field.value}
|
||||
className={classes.fieldValue}
|
||||
onElement={onElement}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
};
|
||||
Reference in new issue
Block a user