mirror of
https://github.com/wassname/talk.git
synced 2026-06-30 07:21:41 +08:00
17 lines
392 B
JavaScript
17 lines
392 B
JavaScript
import React from 'react';
|
|
import styles from './SnackBar.css';
|
|
|
|
const SnackBar = ({children, className, position, ...attrs}) => {
|
|
return (
|
|
<div className={`${styles.SnackBar} ${className}`}
|
|
style={ position ? {top: `${position}px`} : fixedStyle}
|
|
{...attrs} >
|
|
{children}
|
|
</div>
|
|
);
|
|
};
|
|
|
|
const fixedStyle = {bottom: '200px', top: 'auto'};
|
|
|
|
export default SnackBar;
|