MCPcopy Create free account
hub / github.com/Snapchat/Valdi / Button

Function Button

apps/managed_context_example/ManagedContextExample.tsx:51–62  ·  view source on GitHub ↗
(viewModel: { title: string; onTap: () => void })

Source from the content-addressed store, hash-verified

49 {viewModel.children?.()}
50 </layout>;
51}
52
53// JSX function components need a capitalized name.
54// eslint-disable-next-line @typescript-eslint/naming-convention
55function 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>;

Callers 2

CounterFunction · 0.85
HomeScreenFunction · 0.85

Calls 1

systemBoldFontFunction · 0.90

Tested by 2

CounterFunction · 0.68
HomeScreenFunction · 0.68