(viewModel: { title: string; onTap: () => void })
| 49 | {viewModel.children?.()} |
| 50 | </layout>; |
| 51 | } |
| 52 | |
| 53 | // JSX function components need a capitalized name. |
| 54 | // eslint-disable-next-line @typescript-eslint/naming-convention |
| 55 | function Button(viewModel: { title: string; onTap: () => void }): void { |
| 56 | <view |
| 57 | backgroundColor="cornflowerblue" |
| 58 | padding={16} |
| 59 | borderRadius={16} |
| 60 | boxShadow={'1 1 3 rgba(0, 0, 0, 0.16)'} |
| 61 | onTap={viewModel.onTap} |
| 62 | marginBottom={8} |
| 63 | > |
| 64 | <label value={viewModel.title} font={systemBoldFont(14)} color="black" /> |
| 65 | </view>; |