Course Leap landing page is a ready to use Landing page template based on "next.js", "typescript" and "tailwind"
Preview (demo) |
---|
🚧 Codepen |
🚧 Github Page |
🚧 Vercel Page |
# | Dates |
---|---|
Start Date | Sep 10 2022 |
End Date | Oct 17 2022 |
parameters :
# | parameter | type (**) | required | default | description |
---|---|---|---|---|---|
1 | elementName | ElementType |
true |
span |
the element name to create as jsx element |
2 | elementProps | ElementProps |
true |
{} |
element attributes and children |
generic parameters :
# | parameter | type | required | default | description |
---|---|---|---|---|---|
1 | ElementType | type |
true |
- | The Type to validate elementName |
2 | ElementProps | type |
true |
- | The Type to validate the Props |
return type : JSX.Element
(*) : createElement
is generic function
(**) : type of the parameters refer to generic types (typeof of elementProps is interface of default react props)
parameters (ordered) :
# | parameter | type | required | default | description |
---|---|---|---|---|---|
1 | page | string |
true |
undefined |
name of the page-name on locales/ directory |
2 | section | string |
true |
'common' |
layout name on the page |
3 | language | 'en' or 'pr' |
false |
'en' |
the language name on locales/ directory |
parameters (objected) (**) :
# | parameter | type | required | default | description |
---|---|---|---|---|---|
1 | options | object |
true |
{} |
options object of the parameters |
return type : IReturnType
(***)
(*) : useContent
is overridden function to ordered parameters
or objected parameters
(**) : properties of objected parameter
is same of ordered parameters
(***) : IReturnType
is interface :
interface IReturnType {
// return the current language
getLanguage: () => string;
// return the current text of sub-section
content: (subSection: string) => string;
}
-
classnames
:
re-exportedclassNames
library as named module -
Link
andImage
:
re-exportedNext.js
Image
andLink
modules -
PropsWithClassName
:
generic type to contain props with{ className?: string }
-
PropsWithChildren
:
re-exported generic type ofReact.PropsWithChildren
-
PropsWithStyle
:
generic type to contain props with{ style?: object }
-
PropsWithCommon
:
generic type to combinePropsWithChildren
andPropsWithClassName
with props -
PropsWithAll
:
generic type to combinePropsWithCommon
andPropsWithStyle
with props
Any helpful constants, function, classes and types to work with tailwind classname. Exactly the utils to return tailwind classnames from properties
Javascript files to contain properties of tailwind.config.js
as default value
- Can i use Next.js
- Can i use Typescript for typing and more
- Can i use TailwindCSS classnames as statically dynamically
- Can i keep S.O.L.I.D Principles in project (main target)
- Can i keep the codebase clean
- Can i create re-usable component
Under MIT License
Created With 🧠 & ☕ By @mikoloism