Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create the standard ListCell #17

Open
6 of 10 tasks
marcus-grant opened this issue Feb 15, 2018 · 0 comments
Open
6 of 10 tasks

Create the standard ListCell #17

marcus-grant opened this issue Feb 15, 2018 · 0 comments
Assignees
Labels
enhancement New feature or request feature

Comments

@marcus-grant
Copy link
Owner

marcus-grant commented Feb 15, 2018

  • 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
@marcus-grant marcus-grant added enhancement New feature or request feature labels Feb 15, 2018
@marcus-grant marcus-grant self-assigned this Feb 15, 2018
marcus-grant pushed a commit that referenced this issue Feb 22, 2018
* ListCell now has these props...
  * rightAccessory: for passing a custom component
  * rightAccessoryType: a template for a template acsry.
  * rightAccessoryOnPress: an event handler for for acsry.
  * NOTE: styles have been commented out for all listcells
    * this is because a proper validator is needed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature
Projects
None yet
Development

No branches or pull requests

1 participant