mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
add user notifications (#148)
* added notification settings * notifications: added list to profile * notifications: changed appearance for comment notifications
This commit is contained in:
parent
23701a5261
commit
a39d000ff2
27 changed files with 552 additions and 218 deletions
20
src/components/common/InlineUsername/index.tsx
Normal file
20
src/components/common/InlineUsername/index.tsx
Normal file
|
@ -0,0 +1,20 @@
|
|||
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 };
|
6
src/components/common/InlineUsername/styles.module.scss
Normal file
6
src/components/common/InlineUsername/styles.module.scss
Normal file
|
@ -0,0 +1,6 @@
|
|||
.username {
|
||||
font-size: 0.9em;
|
||||
padding: 0 2px;
|
||||
text-transform: lowercase;
|
||||
border-radius: 0.2em;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue