mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-24 20:36:40 +07:00

* added notification settings * notifications: added list to profile * notifications: changed appearance for comment notifications
20 lines
475 B
TypeScript
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 };
|