To implement List component into your project you’ll need to add the import:
import List , { ListItem } from "@kiwicom/orbit-components/lib/List" ;
After adding import into your project you can use it simply like:
< List >
< ListItem > Hello world! </ ListItem >
</ List >
Table below contains all types of the props available in List component.
Namedata-transfer-vertical Type Default Description children React.NodeThe content of the List, normally ListItem . dataTest stringOptional prop for testing purposes. id stringSet id for List. size enum"normal"The size of the List. spaceAfter enumAdditional margin-bottom after component. type enum"primary"The color type of the List. spacing spacing"100"The spacing between List children.
spaceAfter "none""smallest""small""normal""medium""large""largest"
name "none""50""100""150""200""300""400""500""600""800""1000""1200""1600"
Table below contains all types of the props in ListItem component.
Namedata-transfer-vertical Type Default Description children React.NodeThe content of the ListItem. dataTest stringOptional prop for testing purposes. icon React.Node"CircleSmall"The displayed Icon or CarrierLogo component. See Functional specs label TranslationAdds a label to ListItem
size type "small""primary""normal""secondary""large"
You can color your icon if you pass some value into color or customColor prop of the Icon . Be aware of using other components, because they are not styled by default.