Skip to content

Commit

Permalink
working on side menu
Browse files Browse the repository at this point in the history
  • Loading branch information
rupali-codes committed Jan 2, 2023
1 parent 81c395b commit 4903f4c
Show file tree
Hide file tree
Showing 10 changed files with 1,103 additions and 224 deletions.
19 changes: 19 additions & 0 deletions components/Collaps/Collaps.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React from "react";
import { CollapsElement } from "./CollapsElement";
import { dataList,ICollapsProps } from "../../types";

export const Collaps = ({elements,title}:ICollapsProps) => {
return (
<div tabIndex={0} className="collapse collapse-arrow border-b border-base-100">
<div className="collapse-title text-[17px] font-medium">
{title}
</div>
<div className="collapse-content flex flex-col gap-3">
{
elements.map((element:dataList, i:number) => (
<CollapsElement name={element.name} description={element.description} url={element.url} />
))}
</div>
</div>
);
};
14 changes: 14 additions & 0 deletions components/Collaps/CollapsElement.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from "react"
import {dataList} from "../../types"
export const CollapsElement = ({name,description,url}:dataList) => {
return (
<a href={url}>
<div className="border-b-2 border-base-200 py-2 cursor-pointer">
<h4 className="text-violet-500 font-semibold text-[17px]">{name}</h4>
<p>
{description}
</p>
</div>
</a>
)
}
2 changes: 2 additions & 0 deletions components/Collaps/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './Collaps';
export * from './CollapsElement';
Loading

0 comments on commit 4903f4c

Please sign in to comment.