Skip to content

Commit

Permalink
[refactor]: Convert code into a reusable component
Browse files Browse the repository at this point in the history
  • Loading branch information
lokeshkavisth committed Aug 8, 2023
1 parent d89ef23 commit 003b49a
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/components/ui/Card.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from 'react'

const Card = () => {
return (
<div>Card</div>
)
}

export default Card
23 changes: 23 additions & 0 deletions src/components/ui/DropDown.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import React from 'react'

const DropDown = (props) => {
return (
<li className="mb-4">
<select
id={props.id}
value={props.value}
onChange={props.onChange}
className="border w-full rounded-full px-4 py-2 bg-gray-200 bg-opacity-20 backdrop-blur"
>
{props.default && <option value="">Default</option>}
{props.options.map((option) => (
<option key={option.value} value={option.value}>
{option.label}
</option>
))}
</select>
</li>
)
}

export default DropDown

0 comments on commit 003b49a

Please sign in to comment.