Open
Description
Current behaviour
When overriding the elevation level colors for a surface it's not obvious how to do that.
For example:
<Surface
mode="flat"
elevation={0}
theme={{
colors: {
elevation: ['red', 'green', 'blue']
}
}}
>
<Text >Test</Text>
</Surface>
Does not work, it needs this undocumented construct:
<Surface
mode="flat"
elevation={0}
theme={{
colors: {
elevation: { level0: 'red', level1: 'green', level2: 'blue' }
}
}}
>
<Text >Test</Text>
</Surface>
Expected behaviour
Surface elevation color overrides as an array or better documentation about the special construct.
Your Environment
software | version |
---|---|
react-native-paper | 5.12.3 |