diff --git a/components/drip/inputs/Input.jsx b/components/drip/inputs/Input.jsx new file mode 100644 index 0000000..721ed2b --- /dev/null +++ b/components/drip/inputs/Input.jsx @@ -0,0 +1,22 @@ +import { forwardRef } from "react"; +/** + * + * @param {object} props + * @param {string} props.type - the type of the input + * @param {string} props.className - custom tailwindCSS styles for the input + * @returns {JSX.Element} + */ +const Input = forwardRef(({ type, className, ...rest }, ref) => { + return ( + + ); +}); + +export default Input; diff --git a/components/other/ComponentListing.js b/components/other/ComponentListing.js index 49f4317..f7ecfc5 100644 --- a/components/other/ComponentListing.js +++ b/components/other/ComponentListing.js @@ -1,69 +1,74 @@ -import Link from 'next/link' -import { useState, useEffect } from 'react'; +import Link from "next/link"; +import { useState, useEffect } from "react"; import { basicNavbars } from "../drip/navbar/basicNavbars"; -const ComponentListing = ({featured=0}) => { - const [list, setList] = useState(undefined) - const components =[ - { - 'name':'buttons', - 'count':3, - 'icon': 'ri-toggle-line', - 'featured':true - }, - { - 'name':'cards', - 'count':4, - 'icon':'ri-refund-line', - 'featured':true - }, - { - 'name':'headers', +const ComponentListing = ({ featured = 0 }) => { + const [list, setList] = useState(undefined); + const components = [ + { + name: "buttons", + count: 3, + icon: "ri-toggle-line", + featured: true, + }, + { + name: "cards", + count: 4, + icon: "ri-refund-line", + featured: true, + }, + { + name: "headers", + count: 2, + icon: "ri-layout-top-line", + featured: true, + }, + { + name: "footers", + count: 1, + icon: "ri-layout-bottom-line", + featured: true, + }, + { + name: "inputs", + count: 1, + icon: "ri-input-cursor-move", + featured: true, + }, + ]; - 'count':2, + useEffect(() => { + if (featured != 0) { + setList([...components.slice(0, featured)]); + } + }, [featured]); - 'icon': 'ri-layout-top-line', - 'featured':true - }, - { - 'name':'footers', - 'count':1, - 'icon': 'ri-layout-bottom-line', - 'featured':true - }, - - ] + return ( +