react-smartui-header
v1.3.0
Published
Smart Header Component created by React
Downloads
19
Readme
SmartUI Header Component
SmartUI Header Component created by React Library
Getting Started
npm install react-smartui-header --save
Import module and it's style
import { Header } from 'react-smartui-header'
import 'react-smartui-header/css/style.css'
Example Usage
class App extends React.Component {
render() {
return (
<Header.Body>
<Header.Customer />
<Header.Sale />
</Header.Body>
)
}
}
Component Overview
Header
|__Body
|__Customer
|__Sale
|__Menu
Props
Header.Body Props
version: PropTypes.string,
applicationName: PropTypes.string,
channelAlias: PropTypes.string,
loginAs: PropTypes.shape({
code: '',
name: ''
}),
orderId: PropTypes.string,
saleCode: PropTypes.string,
partnerCode: PropTypes.string,
customer: PropTypes.shape({
fullname: PropTypes.string,
certificateNumber: PropTypes.string,
customerType: PropTypes.string
}),
onLogout: PropTypes.func,
onEndApp: PropTypes.func
Header.Customer Props
title: PropTypes.string,
verification: PropTypes.shape({
isBlacklist: PropTypes.bool,
isCollection: PropTypes.bool,
isFraud: PropTypes.bool
}),
customerType: PropTypes.string,
certificateNumber: PropTypes.string,
customerFullname: PropTypes.string,
isExistingCustomer: PropTypes.bool,
show: PropTypes.bool,
onEndProgram: PropTypes.func
Header.Sale Props
title: PropTypes.string,
sales: PropTypes.arrayOf(
PropTypes.shape({
code: PropTypes.string,
nameTh: PropTypes.string,
nameEn: PropTypes.string,
title: PropTypes.string,
icon: PropTypes.string,
channelAlias: PropTypes.string
})
)
Header.Menu Props
title: PropTypes.string,
show: PropTypes.bool,
menus: PropTypes.arrayOf(PropTypes.shape({})),
labelKey: PropTypes.string,
childrenKey: PropTypes.string,
urlKey: PropTypes.string
Thank you for your suggestions!