Hello, can anyone clarify one thing. I have custom...
# compose
n
Hello, can anyone clarify one thing. I have custom design system. So my project uses oonly fundation, and does not use material libraries. If I have to change my custom button background color based on interaction source status (focused/pressed/default), should I use indication, or it can be done just collecting interaction source states and changing colors directly in my custom button?
l
Either is fine, it’s more about whether this is something generic that should be reused across all your components, or if it’s specific to button and the colors available for a button. From what you described I would probably start just by collecting it directly (ideally you would only change colors inside some drawing code, instead of requiring a recomposition when the state changes), and if you need to reuse it later you can make an indication implementation later
👍 1