forked from smooth-code/smooth-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathModalHeader.js
34 lines (29 loc) · 855 Bytes
/
ModalHeader.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import React from 'react'
import PropTypes from 'prop-types'
import styled from 'styled-components'
import classNames from 'classnames'
import * as defaultTheme from './theme/defaultTheme'
import { mixin } from './utils'
const ModalHeaderComponent = ({ className, theme, ...props }) => (
<div className={classNames('sui-modal-header', className)} {...props} />
)
const ModalHeader = styled(ModalHeaderComponent)`
${mixin('base')};
display: flex;
align-items: flex-start;
justify-content: space-between;
padding: 1rem;
border-bottom: 1px solid #e9ecef;
border-top-left-radius: 0.3rem;
border-top-right-radius: 0.3rem;
`
ModalHeader.propTypes = {
children: PropTypes.node,
className: PropTypes.string,
theme: PropTypes.object,
}
ModalHeader.defaultProps = {
theme: defaultTheme,
}
/** @component */
export default ModalHeader