React-native-paper: Not able to change default list icon size

Created on 9 Nov 2018  路  5Comments  路  Source: callstack/react-native-paper


Current behaviour

Not able to change default icon size. Tried changing fontSize via style prop within but not working.

And how to change the fontSize ?

Non of these requirements documented in the documentation.

Expected behaviour

Need to add custom icon in list with the default list properties. and need to change default size.

Your Environment

| software | version
| --------------------- | -------
| react-native | 0.57.0
| react-native-paper | 2.1.3

Most helpful comment

Hi, it is not possible to change size of List.Icon. In such case please use custom component e.g:

import { List } from 'react-native-paper';
import Icon from 'react-native-vector-icons/MaterialIcons';

<List.Item
   left={props => <Icon {...props} size={30} name="event" />}
   title="List item 1"
/>

All 5 comments

Hi, it is not possible to change size of List.Icon. In such case please use custom component e.g:

import { List } from 'react-native-paper';
import Icon from 'react-native-vector-icons/MaterialIcons';

<List.Item
   left={props => <Icon {...props} size={30} name="event" />}
   title="List item 1"
/>

Hi, it is not possible to change size of List.Icon. In such case please use custom component e.g:

import { List } from 'react-native-paper';
import Icon from 'react-native-vector-icons/MaterialIcons';

          <List.Item
            left={props => <Icon {...props} size={30} name="event" />}
            title="List item 1"
          />

What about the title and description fontSize?

Render custom component:

title={<Text style={{ fontSize: 30 }}>Some text here</Text>}

@Trancever How to insert image instead of icon on the left of the row?

Just pass Image component instead of Icon.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

satya164 picture satya164  路  4Comments

alikazemkhanloo picture alikazemkhanloo  路  4Comments

zachariahtimothy picture zachariahtimothy  路  3Comments

scottybo picture scottybo  路  3Comments

ZhengYuTay picture ZhengYuTay  路  3Comments