web: Init Nav menu component
This commit is contained in:
parent
cc804a21c5
commit
8020d35669
@ -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;
|
||||
|
@ -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 };
|
||||
|
@ -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>
|
||||
));
|
27
web/ASC.Web.Components/src/components/Nav/index.js
Normal file
27
web/ASC.Web.Components/src/components/Nav/index.js
Normal 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
|
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user