mirror of
https://github.com/wassname/talk.git
synced 2026-07-27 11:28:12 +08:00
Icon User Drawer
This commit is contained in:
@@ -37,6 +37,12 @@
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
|
||||
.icon {
|
||||
color: #595959;
|
||||
font-size: 25px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
@@ -2,11 +2,14 @@ import React from 'react';
|
||||
import cn from 'classnames';
|
||||
import PropTypes from 'prop-types';
|
||||
import styles from './Drawer.css';
|
||||
import {Icon} from 'coral-ui';
|
||||
|
||||
const Drawer = ({children, onClose, className = ''}) => {
|
||||
return (
|
||||
<div className={cn(styles.drawer, className)}>
|
||||
<button className={cn(styles.closeButton, [className, 'close-button'].join('-'))} onClick={onClose}>×</button>
|
||||
<button className={cn(styles.closeButton, [className, 'close-button'].join('-'))} onClick={onClose}>
|
||||
<Icon name="close" className={styles.icon} />
|
||||
</button>
|
||||
<div className={styles.content}>
|
||||
{children}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user