1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-24 20:36:40 +07:00
vault-frontend/src/components/common/InlineUsername/index.tsx
muerwre a39d000ff2
add user notifications (#148)
* added notification settings

* notifications: added list to profile

* notifications: changed appearance for comment notifications
2023-03-11 17:16:31 +06:00

20 lines
475 B
TypeScript

import React, { FC } from 'react';
import { useColorFromString } from '~/hooks/color/useColorFromString';
import styles from './styles.module.scss';
interface InlineUsernameProps {
children: string;
}
const InlineUsername: FC<InlineUsernameProps> = ({ children }) => {
const backgroundColor = useColorFromString(children);
return (
<span style={{ backgroundColor }} className={styles.username}>
~{children}
</span>
);
};
export { InlineUsername };