3.0.1 • Published 8 months ago

@licuido-ui/ui_list-card-view v3.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

List Card View

The ListCardView component is a React component designed for rendering a list of cards, each containing specific data elements. It is part of a larger UI library and is used to display a collection of cards with a common header. Each card in the list represents an item with various details such as an image, user name, status, date, and a customizable button.

Author

Link

Story Book Link listCardView

PlayGround

Try it have a fun codeBox

Installation

npm i @licuido-ui/ui_list-card-view

Import component

import { ListCardView } from '@licuido-ui/ui_list-card-view';

Usage

<ListCardView
      headerText=""
      selectValue=""
      SelectOptions={[]}
      listCardData={[]}
      popoverContentData={popoverContentData}={[]}
      handleChange={(event) => console.log('Select changed:', event)}
      handleMoreClick={() => console.log('More button clicked')}
      handleMoveClick={() => console.log('Move button clicked')}
      handleButtonClick={() => console.log('Card button clicked')}
      handlePopOverClose={() => console.log('Card button clicked')}
      handlePopoverContentClick={() => console.log('Card button clicked')}
      innerCardWidth=''
      addHeaderStyle={}
      selectFontSize=''
      selectBorderRadius=''
      selectBorderSize=''
      selectBorderColor=''
      selectWidth=''
      selectHeight=''
      addImageStyle={}
      addUserNameStyle={}
      addStatusStyle={}
      addDateStyle={}
      innerCardBorder=''
      innerCardBorderColor=''
      showMoveIcon={true}
      showMoreIcon={true}
      showDropdown= {true}
      popOverOpen= {false}
      popOverState= {null}
      popOverId= ''
      popOverAnchorOrigin= {
        vertical: 'bottom',
        horizontal: 'left',
  }
    />

Image

alt text

Props

PropTypeDefault ValueDescription
classNamestring''Additional CSS class names for styling the component.
sxSxProps<Theme>{}The style object or function for customizing the component.
headerTextstring'Pending Requests'Text to be displayed in the header of the component.
selectValuestring'Pending'The current value of the select input.
SelectOptionsoptionsInterface[][]Array of options for the select input.
listCardDataListCardInterface[][]Array of objects containing data for each card.
popoverContentDataPopOverContent[]['Edit', 'Delete', 'View']Array of strings representing the content for the popover.
handleChange(event: SelectChangeEvent<unknown>) => void() => nullCallback function triggered on select input value change.
handleMoreClick(event: React.MouseEvent<HTMLButtonElement>) => void() => nullCallback function triggered on "More" button click.
handleMoveClick() => void() => nullCallback function triggered on "Move" button click.
handleButtonClick() => void() => nullCallback function triggered on card button click.
handlePopOverClose() => void() => nullCallback function triggered on popover close.
handlePopoverContentClick(content: string) => void() => nullCallback function triggered on popover content click.
innerCardWidthstring'381px'Width of the inner card.
addHeaderStyleSxProps<Theme>{ fontSize: '16px', fontWeight: 600, color: '#02111A' }Additional styles for the header.
selectFontSizestring'12px'Font size for the select input.
selectBorderRadiusstring'6px'Border radius for the select input.
selectBorderSizestring'1.5px solid'Border size and style for the select input.
selectBorderColorstring'#0C356A'Border color for the select input.
selectWidthstring'81px'Width of the select input.
selectHeightstring'24px'Height of the select input.
addImageStyleSxProps<Theme>{ width: '40px', height: '40px' }Additional styles for the card image.
addUserNameStyleSxProps<Theme>{ fontSize: '14px', fontWeight: 600, color: '#02111A' }Additional styles for the user name.
addStatusStyleSxProps<Theme>{ fontSize: '14px', fontWeight: 400, color: '#4E585E' }Additional styles for the status.
addDateStyleSxProps<Theme>{ fontSize: '14px', fontWeight: 400, color: '#4E585E' }Additional styles for the date.
addButtonTextStyleSxProps<Theme>{ fontSize: '12px', fontWeight: 600, color: '#02111A' }Additional styles for the button text.
innerCardBorderstring'1px solid'Border size and style for the inner card.
innerCardBorderColorstring'#D9DBDD'Border color for the inner card.
showMoveIconbooleantrueWhether to show the "Move" icon.
showMoreIconbooleantrueWhether to show the "More" icon.
showDropdownbooleantrueWhether to show the dropdown.
popOverIdstring'simple-popover'ID for the popover.
popOverOpenboolean | undefinedfalseState for the popover open/close.
popOverStateHTMLButtonElement | nullnullState for the popover.
popOverAnchorOriginPopOverAnchorOrigin{ vertical: 'bottom', horizontal: 'left' }Anchor origin for the popover.
stickyHeaderbooleantrueWhether to make the header position sticky or not.