Skip to content

localpk/custom-components

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

Custom Components

Custom ReactJS components used by Local PK.

Custom components are basically ReactJS components. These are used here to produce custom UI elements from user generated contents that otherwise are not so straightforward to produce and sometime impossible. There are few things that need to be made sure when using these components:

  • The value for all attributes are type string
  • closing tag must be provided e.g. <my-component /> is not allowed

Here is the list of Custom Components available for Local PK content:

<featured-numbers>

Attributes

Name Value
data stringified JSON

This component is used to display numbers prominently. A description is required against each number in the data.

Example

<featured-numbers data='[
  {"numbers":"342", "description": "Total number of members"},
  {"numbers":"272", "description": "Directly elected members"}
]'
></featured-numbers>

Above code example renders following:

image


License

MIT License

© 2019 local.com.pk

About

Custom ReactJS components used by Local PK

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published