Skip to content

Create the standard ListCell #17

@marcus-grant

Description

@marcus-grant
  • Should wrap using the same standard internal const cellClass as its className
  • children as a prop determines whether the component should render by composition and will use the same wrap function as before to simply wrap the children around a div with cellClass
  • classPrefix: a string that gives the cell's cellClass a prefix that precedes, for example _PREFIX_list-cell__container if this prop is given PREFIX in the prop.
  • onPress: a function that gets called with an event listener as its parameter whenever the cell notices a click or press action
  • text: an optional string representing the main text label of the cell. If no secondary is provided it will render at the vertical center
  • secondaryText: another optional string representing the secondary text label.
    • Note there can be no text labels at all, and they default to undefined. There can be only a main text label, or there can be both. There can't be only a secondaryText prop.
  • leftAccessory: an optional *a valid template string, function return a node, node, or array of nodes. An accessory is any extra UI elements that live inside the cell (icons, controls, images, svg, etc.). Defaults to undefined and will simply just not render if not specified. A string can be given that has a valid value for a predefined template for the accessory view. Template Accessory components will be created later
  • rightAccessory: same as above, just gets rendered to the right most part of the cell
  • keyExtractor: an optional string or a function that returns a string that specifies the key to the cells inside since this is likely to be an iterated component. If none is specified, it will simply copy text.
  • styles: an optional object containing all the CSS styles to be rendered via react as opposed to CSS

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions