List Item
List items are used as children of the List
component.
They usually begins with a bullet or a number.
Was this section helpful?
Basic ListItem
import {
reactExtension,
List,
ListItem,
} from '@shopify/ui-extensions-react/checkout';
export default reactExtension(
'purchase.checkout.block.render',
() => <Extension />,
);
function Extension() {
return (
<List>
<ListItem>100% organic cotton</ListItem>
</List>
);
}
examples
Basic ListItem
React
import { reactExtension, List, ListItem, } from '@shopify/ui-extensions-react/checkout'; export default reactExtension( 'purchase.checkout.block.render', () => <Extension />, ); function Extension() { return ( <List> <ListItem>100% organic cotton</ListItem> </List> ); }
JS
import {extension, List, ListItem} from '@shopify/ui-extensions/checkout'; export default extension('purchase.checkout.block.render', (root) => { const list = root.createComponent(List, undefined, [ root.createComponent(ListItem, undefined, '100% organic cotton'), ]); root.appendChild(list); });
Preview
