web: Init Nav menu component

This commit is contained in:
Alexey Safronov 2019-05-23 17:29:25 +03:00
parent cc804a21c5
commit 8020d35669
6 changed files with 87 additions and 2 deletions

View File

@ -450,6 +450,31 @@ LoginForm.defaultProps = {
password: ''
};
var _jsxFileName$3 = "D:\\GitHub\\CommunityServer-AspNetCore\\web\\ASC.Web.Components\\src\\components\\Nav\\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() {
return data;
};
return data;
}
var StyledNav = styled__default(reactstrap.Navbar)(_templateObject$3());
var Nav = function Nav(props) {
var children = props.children;
return core.jsx(StyledNav, {
dark: true,
__source: {
fileName: _jsxFileName$3,
lineNumber: 19
},
__self: this
}, children);
};
Nav.propTypes = {
text: PropTypes.string
};
exports.Button = Button;
exports.LoginForm = LoginForm;
exports.Nav = Nav;
exports.TextInput = TextInput;

View File

@ -2,7 +2,7 @@ import { jsx } from '@emotion/core';
import { useState } from 'react';
import styled, { css } from 'styled-components';
import PropTypes from 'prop-types';
import { Row, Container, Col, Collapse } from 'reactstrap';
import { Row, Container, Col, Collapse, Navbar } from 'reactstrap';
function _defineProperty(obj, key, value) {
if (key in obj) {
@ -442,4 +442,28 @@ LoginForm.defaultProps = {
password: ''
};
export { Button, LoginForm, TextInput };
var _jsxFileName$3 = "D:\\GitHub\\CommunityServer-AspNetCore\\web\\ASC.Web.Components\\src\\components\\Nav\\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() {
return data;
};
return data;
}
var StyledNav = styled(Navbar)(_templateObject$3());
var Nav = function Nav(props) {
var children = props.children;
return jsx(StyledNav, {
dark: true,
__source: {
fileName: _jsxFileName$3,
lineNumber: 19
},
__self: this
}, children);
};
Nav.propTypes = {
text: PropTypes.string
};
export { Button, LoginForm, Nav, TextInput };

View File

@ -0,0 +1,8 @@
import React from 'react';
import { storiesOf } from '@storybook/react';
import { Nav } from 'asc-web-components';
storiesOf('Components|Nav', module)
.add('base', () => (
<Nav></Nav>
));

View File

@ -0,0 +1,27 @@
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;
color: #c5c5c5;
height: 48px;
padding-top: 4px;
z-index: 1;
`;
const Nav = props => {
const { children } = props;
return (
<StyledNav dark>{children}</StyledNav>
);
}
Nav.propTypes = {
text: PropTypes.string
}
export default Nav

View File

@ -1,3 +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'