Skip to content

Commit

Permalink
created single export file
Browse files Browse the repository at this point in the history
  • Loading branch information
t007rushi committed Mar 29, 2022
1 parent fc040d5 commit 29f1a52
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 13 deletions.
3 changes: 1 addition & 2 deletions src/Layout/Header/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import "./note-header.css";
import { AiOutlineSearch, AiOutlineMenu } from "react-icons/ai";
import { MdDarkMode, MdLogout } from "react-icons/md";

const Header = ({ toggle }) => {
export const Header = ({ toggle }) => {
return (
<header className="flex-row header-bar">
<div className="flex-row spc-btwn header-left">
Expand All @@ -25,4 +25,3 @@ const Header = ({ toggle }) => {
);
};

export default Header;
2 changes: 2 additions & 0 deletions src/Layout/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export {Sidebar} from './sidebar/Sidebar'
export {Header} from './Header/Header'
3 changes: 1 addition & 2 deletions src/Layout/sidebar/Sidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import "./sidebar.css";
import { useNavigate } from "react-router-dom";
import sidebarData from "../../data/sidebarData";

const Sidebar = ({ sidebar }) => {
export const Sidebar = ({ sidebar }) => {
const navigator = useNavigate();

return (
Expand All @@ -25,4 +25,3 @@ const Sidebar = ({ sidebar }) => {
);
};

export default Sidebar;
4 changes: 2 additions & 2 deletions src/components/CreateNote/CreateNote.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import "./create-note.css";
import Editor from "../Editor/Editor";
import { MdOutlineColorLens } from "react-icons/md";

const CreateNote = () => {
export const CreateNote = () => {
const [expand, setExpand] = useState(false);
const closer = () => {
setExpand(false);
Expand Down Expand Up @@ -41,4 +41,4 @@ const CreateNote = () => {
);
};

export default CreateNote;

1 change: 1 addition & 0 deletions src/components/CreateNote/create-note.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
border-radius: 5px;
outline: none;
border: none;
padding:5px;
}

.note-title {
Expand Down
7 changes: 4 additions & 3 deletions src/components/Note/Note.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React from "react";

const Note = () => {
return <div>Note</div>;
export const Note = () => {
return <div>
Note
</div>;
};

export default Note;
2 changes: 2 additions & 0 deletions src/components/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export {CreateNote} from "./CreateNote/CreateNote"
export {Note} from "./Note/Note"
6 changes: 2 additions & 4 deletions src/pages/Notes/NotesPage.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import React, { useState } from "react";
import Sidebar from "../../Layout/sidebar/Sidebar";
import Header from "../../Layout/Header/Header";
import CreateNote from "../../components/CreateNote/CreateNote";
import Note from "../../components/Note/Note";
import {Sidebar,Header} from "../../Layout/index.js";
import {CreateNote,Note} from "../../components/index.js"
import "./notes.css"

export const NotesPage = () => {
Expand Down

0 comments on commit 29f1a52

Please sign in to comment.