web: Refactoring NavMenu
This commit is contained in:
parent
7a23845045
commit
5c40ce9b40
@ -450,7 +450,7 @@ LoginForm.defaultProps = {
|
||||
password: ''
|
||||
};
|
||||
|
||||
var _jsxFileName$3 = "D:\\GitHub\\CommunityServer-AspNetCore\\web\\ASC.Web.Components\\src\\components\\Nav\\index.js";
|
||||
var _jsxFileName$3 = "D:\\GitHub\\CommunityServer-AspNetCore\\web\\ASC.Web.Components\\src\\components\\NavMenu\\index.js";
|
||||
function _templateObject$3() {
|
||||
var data = _taggedTemplateLiteral(["\n background: #0f4071;\n color: #c5c5c5;\n height: 48px;\n padding-top: 4px;\n z-index: 1;\n"]);
|
||||
_templateObject$3 = function _templateObject() {
|
||||
@ -459,22 +459,22 @@ function _templateObject$3() {
|
||||
return data;
|
||||
}
|
||||
var StyledNav = styled__default(reactstrap.Navbar)(_templateObject$3());
|
||||
var Nav = function Nav(props) {
|
||||
var NavMenu = function NavMenu(props) {
|
||||
var children = props.children;
|
||||
return core.jsx(StyledNav, {
|
||||
dark: true,
|
||||
__source: {
|
||||
fileName: _jsxFileName$3,
|
||||
lineNumber: 19
|
||||
lineNumber: 18
|
||||
},
|
||||
__self: this
|
||||
}, children);
|
||||
};
|
||||
Nav.propTypes = {
|
||||
text: PropTypes.string
|
||||
NavMenu.propTypes = {
|
||||
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node])
|
||||
};
|
||||
|
||||
exports.Button = Button;
|
||||
exports.LoginForm = LoginForm;
|
||||
exports.Nav = Nav;
|
||||
exports.NavMenu = NavMenu;
|
||||
exports.TextInput = TextInput;
|
||||
|
@ -442,7 +442,7 @@ LoginForm.defaultProps = {
|
||||
password: ''
|
||||
};
|
||||
|
||||
var _jsxFileName$3 = "D:\\GitHub\\CommunityServer-AspNetCore\\web\\ASC.Web.Components\\src\\components\\Nav\\index.js";
|
||||
var _jsxFileName$3 = "D:\\GitHub\\CommunityServer-AspNetCore\\web\\ASC.Web.Components\\src\\components\\NavMenu\\index.js";
|
||||
function _templateObject$3() {
|
||||
var data = _taggedTemplateLiteral(["\n background: #0f4071;\n color: #c5c5c5;\n height: 48px;\n padding-top: 4px;\n z-index: 1;\n"]);
|
||||
_templateObject$3 = function _templateObject() {
|
||||
@ -451,19 +451,19 @@ function _templateObject$3() {
|
||||
return data;
|
||||
}
|
||||
var StyledNav = styled(Navbar)(_templateObject$3());
|
||||
var Nav = function Nav(props) {
|
||||
var NavMenu = function NavMenu(props) {
|
||||
var children = props.children;
|
||||
return jsx(StyledNav, {
|
||||
dark: true,
|
||||
__source: {
|
||||
fileName: _jsxFileName$3,
|
||||
lineNumber: 19
|
||||
lineNumber: 18
|
||||
},
|
||||
__self: this
|
||||
}, children);
|
||||
};
|
||||
Nav.propTypes = {
|
||||
text: PropTypes.string
|
||||
NavMenu.propTypes = {
|
||||
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node])
|
||||
};
|
||||
|
||||
export { Button, LoginForm, Nav, TextInput };
|
||||
export { Button, LoginForm, NavMenu, TextInput };
|
||||
|
@ -1,8 +1,8 @@
|
||||
import React from 'react';
|
||||
import { storiesOf } from '@storybook/react';
|
||||
import { Nav } from 'asc-web-components';
|
||||
import { NavMenu } from 'asc-web-components';
|
||||
|
||||
storiesOf('Components|Nav', module)
|
||||
storiesOf('Components|NavMenu', module)
|
||||
.add('base', () => (
|
||||
<Nav></Nav>
|
||||
<NavMenu></NavMenu>
|
||||
));
|
@ -2,7 +2,6 @@ import React from 'react'
|
||||
import { Navbar } from 'reactstrap'
|
||||
import styled from 'styled-components'
|
||||
import PropTypes from 'prop-types'
|
||||
import './styles.scss'
|
||||
|
||||
const StyledNav = styled(Navbar)`
|
||||
background: #0f4071;
|
||||
@ -12,7 +11,7 @@ const StyledNav = styled(Navbar)`
|
||||
z-index: 1;
|
||||
`;
|
||||
|
||||
const Nav = props => {
|
||||
const NavMenu = props => {
|
||||
const { children } = props;
|
||||
|
||||
return (
|
||||
@ -20,8 +19,11 @@ const Nav = props => {
|
||||
);
|
||||
}
|
||||
|
||||
Nav.propTypes = {
|
||||
text: PropTypes.string
|
||||
NavMenu.propTypes = {
|
||||
children: PropTypes.oneOfType([
|
||||
PropTypes.arrayOf(PropTypes.node),
|
||||
PropTypes.node
|
||||
])
|
||||
}
|
||||
|
||||
export default Nav
|
||||
export default NavMenu
|
@ -1,4 +1,4 @@
|
||||
export { default as Button } from './components/Button/'
|
||||
export { default as TextInput } from './components/TextInput/'
|
||||
export { default as LoginForm } from './components/Forms/Login'
|
||||
export { default as Nav } from './components/Nav'
|
||||
export { default as NavMenu } from './components/NavMenu'
|
||||
|
Loading…
Reference in New Issue
Block a user