Skip to content

Commit

Permalink
Updated: Dropdown component updated.
Browse files Browse the repository at this point in the history
  • Loading branch information
Arifulislam5577 committed Feb 20, 2024
1 parent 37b3080 commit ce72d53
Show file tree
Hide file tree
Showing 53 changed files with 180 additions and 1,246 deletions.
2 changes: 2 additions & 0 deletions app/docs/components/alert/variant/AlertColorVariant.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client'
import { Alert } from '../../../../src'

const AlertWithColorVariant = () => {
Expand Down Expand Up @@ -53,6 +54,7 @@ const AlertWithColorVariant = () => {
}

const AlertWithColorVariantCode = `
'use client'
import { Alert } from 'keep-react'
export const AlertComponent = () => {
Expand Down
2 changes: 2 additions & 0 deletions app/docs/components/alert/variant/AlertWithBgColor.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client'
import { Alert } from '../../../../src'

const AlertWithBgColor = () => {
Expand Down Expand Up @@ -53,6 +54,7 @@ const AlertWithBgColor = () => {
}

const AlertWithBgColorCode = `
'use client'
import { Alert } from 'keep-react'
export const AlertComponent = () => {
Expand Down
2 changes: 2 additions & 0 deletions app/docs/components/alert/variant/AlertWithCard.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client'
import { Alert, Button, CheckBox } from '../../../../src'

const AlertWithCard = () => {
Expand Down Expand Up @@ -158,6 +159,7 @@ const AlertWithCard = () => {
}

const AlertWithCardCode = `
'use client'
import { Alert, Button, CheckBox } from 'keep-react'
export const AlertComponent = () => {
Expand Down
4 changes: 2 additions & 2 deletions app/docs/components/alert/variant/AlertWithDismissIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client'
import { Alert } from '../../../../src'
import { useState } from 'react'
import { Alert } from '../../../../src'

const AlertWithDismissIcon = () => {
const [showAlert, setShowAlert] = useState(false)
Expand All @@ -22,8 +22,8 @@ const AlertWithDismissIcon = () => {

const AlertWithDismissIconCode = `
'use client'
import { Alert } from '../../../../src'
import { useState } from 'react'
import { Alert } from 'keep-react'
const AlertComponent = () => {
const [showAlert, setShowAlert] = useState(false)
Expand Down
2 changes: 2 additions & 0 deletions app/docs/components/alert/variant/DefaultAlert.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client'
import { Alert } from '../../../../src'

const DefaultAlert = () => {
Expand All @@ -15,6 +16,7 @@ const DefaultAlert = () => {
}

const DefaultAlertCode = `
'use client'
import { Alert } from 'keep-react'
export const AlertComponent = () => {
Expand Down
2 changes: 2 additions & 0 deletions app/docs/components/avatar/variant/AvatarGroup.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client'
import { Avatar } from '../../../../src'

const AvatarGroup = () => {
Expand All @@ -13,6 +14,7 @@ const AvatarGroup = () => {
}

const AvatarGroupCode = `
'use client'
import { Avatar } from 'keep-react'
const AvatarGroupComponent = () => {
Expand Down
3 changes: 3 additions & 0 deletions app/docs/components/avatar/variant/DefaultAvatar.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
'use client'
import { Avatar } from '../../../../src'

const DefaultAvatar = () => {
return <Avatar />
}

const DefaultAvatarCode = `
'use client'
import { Avatar } from 'keep-react'
export const AvatarComponent = () => {
return <Avatar />
}
Expand Down
1 change: 1 addition & 0 deletions app/docs/components/avatar/variant/ImageOfAvatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const ImageOfAvatar = () => {
}

const ImageOfAvatarCode = `
'use client'
import { Avatar } from "keep-react"
export const AvatarComponent = () => {
Expand Down
1 change: 1 addition & 0 deletions app/docs/components/avatar/variant/SizesOfAvatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const SizesOfAvatar = () => {
}

const SizesOfAvatarCode = `
'use client'
import { Avatar } from "keep-react"
export const AvatarComponent = () => {
Expand Down
2 changes: 2 additions & 0 deletions app/docs/components/avatar/variant/StatusOfAvatar.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client'
import { Avatar } from '../../../../src'

const StatusOfAvatar = () => {
Expand All @@ -10,6 +11,7 @@ const StatusOfAvatar = () => {
}

const StatusOfAvatarCode = `
'use client'
import { Avatar } from "keep-react";
export const AvatarComponent = () => {
Expand Down
4 changes: 2 additions & 2 deletions app/docs/components/badge/variant/BadgeWithDot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ const BadgeWithDot = () => {
}

const BadgeWithDotCode = `
"use client";
import { Badge } from "keep-react";
'use client'
import { Badge } from 'keep-react'
export const BadgeComponent = () => {
return (
Expand Down
4 changes: 2 additions & 2 deletions app/docs/components/badge/variant/SizesOfBadge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ const SizesOfBadge = () => {
}

const SizesOfBadgeCode = `
"use client";
import { Badge } from "keep-react";
'use client'
import { Badge } from 'keep-react'
export const BadgeComponent = () => {
return (
Expand Down
4 changes: 2 additions & 2 deletions app/docs/components/badge/variant/VariantOfBadge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ const VariantOfBadge = () => {
}

const VariantOfBadgeCode = `
"use client";
import { Badge } from "keep-react";
'use client'
import { Badge } from 'keep-react'
export const BadgeComponent = () => {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const BreadcrumbDividerIcon = () => {
}

const BreadcrumbDividerIconCode = `
'use client'
import { Breadcrumb } from "keep-react"
export const BreadcrumbComponent = () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client'
import { Breadcrumb } from '../../../../src'

const BreadcrumbWithBorder = () => {
Expand Down
2 changes: 2 additions & 0 deletions app/docs/components/breadcrumb/variant/DefaultBreadcrumb.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
'use client'
import { Breadcrumb } from '../../../../src'

const DefaultBreadcrumb = () => {
Expand All @@ -19,6 +20,7 @@ const DefaultBreadcrumb = () => {
}

const DefaultBreadcrumbCode = `
'use client'
import { Breadcrumb } from 'keep-react'
const BreadcrumbComponent = () => {
Expand Down
4 changes: 2 additions & 2 deletions app/docs/components/button/variant/KeepButtonColor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ const KeepButtonColor = () => {
}

const KeepButtonColorCode = `
"use client"
import { Button } from "keep-react"
'use client'
import { Button } from 'keep-react'
export const ButtonComponent = () => {
return (
Expand Down
4 changes: 2 additions & 2 deletions app/docs/components/button/variant/KeepButtonSize.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ const KeepButtonSize = () => {
}

const KeepButtonSizeCode = `
"use client";
import { Button } from "keep-react;
'use client'
import { Button } from 'keep-react'
export const ButtonComponent = () => {
return (
Expand Down
3 changes: 2 additions & 1 deletion app/docs/components/button/variant/KeepButtonType.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ const KeepButtonType = () => {
}

const KeepButtonTypeCode = `
import { Button } from "keep-react";
'use client'
import { Button } from 'keep-react'
export const ButtonComponent = () => {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client'
import { Button } from '../../../../src'
import { ChatCircleDots, Cube, Gear } from 'phosphor-react'
import { Button } from '../../../../src'

const ButtonGroupWithIcon = () => {
return (
Expand All @@ -24,9 +24,9 @@ const ButtonGroupWithIcon = () => {
}

const ButtonGroupWithIconCode = `
"use client";
import { Button } from "keep-react";
import { ChatCircleDots, Cube, Gear } from "phosphor-react";
'use client'
import { Button } from 'keep-react'
import { ChatCircleDots, Cube, Gear } from 'phosphor-react'
export const ButtonGroupComponent = () => {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ const DefaultButtonGroup = () => {
}

const DefaultButtonGroupCode = `
"use client";
import { Button } from "keep-react";
'use client'
import { Button } from 'keep-react'
export const ButtonGroupComponent = () => {
return (
Expand Down
13 changes: 11 additions & 2 deletions app/docs/components/dropdown/Dropdown.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { DefaultDropdown, DefaultDropdownCode } from './variant/DefaultDropdown'
import { DropdownWithIcon, DropdownWithIconCode } from './variant/DropdownWithIcon'
import { CustomDropdown, CustomDropdownCode } from './variant/CustomDropdown'
import { dropdownAPIData } from './DropdownApi'
import CodePreview from '../../../components/CodePreview'
import ComponentApi from '../../../components/ComponentApi'
Expand All @@ -10,20 +11,28 @@ The Dropdown Component is a versatile user interface element that provides users

## Default Dropdown

The Default Dropdown represents some list items as a dropdown items with `<Dropdown.Item>` components and the `<Dropdown>` is a wrapper button where user can click to show the dropdown items. `dismissOnClick={true}` props means when the user select a dropdown item dropdown will be closed.
The Default Dropdown represents a list of items as dropdown items with `<Dropdown.Item>` components.

<CodePreview github="Dropdown" code={DefaultDropdownCode}>
<DefaultDropdown />
</CodePreview>

## Dropdown With Icon

The Dropdown with Both Side Icon component combines dropdown items with icons on both sides of the label.
The Dropdown with Icon component allows you to include icons within dropdown items.

<CodePreview github="Dropdown" code={DropdownWithIconCode}>
<DropdownWithIcon />
</CodePreview>

## Customize Dropdown

Customize the dropdown according to your preferences.

<CodePreview github="Dropdown" code={CustomDropdownCode}>
<CustomDropdown />
</CodePreview>

## API Reference

Here is a list of the props that you can pass to the dropdown component:
Expand Down
31 changes: 15 additions & 16 deletions app/docs/components/dropdown/DropdownApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,30 @@ export const dropdownAPIData = [
},
{
id: 2,
propsName: 'trigger',
propsType: ['hover', 'click'],
propsDescription: 'Specifies the trigger behavior for the dropdown.',
default: 'click',
propsName: 'showArrow',
propsType: 'boolean',
propsDescription: 'Enables or disables the floating arrow within the dropdown.',
default: 'false',
},
{
id: 3,
propsName: 'label',
propsName: 'className',
propsType: 'string',
propsDescription: 'The content to display within the dropdown.',
default: 'Dropdown Button',
propsDescription: 'Custom class for styling the dropdown',
default: '',
},

{
id: 4,
propsName: 'floatingArrow',
propsType: 'boolean',
propsDescription: 'Enables or disables the floating arrow within the dropdown.',
default: 'false',
propsName: 'actionClassName',
propsType: 'string',
propsDescription: 'action button Custom class for styling',
default: '',
},
{
id: 5,
propsName: 'arrowIcon',
propsType: 'boolean',
propsDescription: 'Enables or disables the arrow icon.',
default: 'true',
propsName: 'action',
propsType: 'ReactNode',
propsDescription: 'Dropdown clickable item',
default: 'Dot Icon',
},
]
Loading

0 comments on commit ce72d53

Please sign in to comment.