Skip to content

Commit

Permalink
Rename DropdownOption to Option and update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
FrederikBolding committed May 24, 2024
1 parent 989bcc4 commit e322bae
Show file tree
Hide file tree
Showing 38 changed files with 86 additions and 86 deletions.
2 changes: 1 addition & 1 deletion packages/examples/packages/bip32/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "/iHYX1Nmt6RAkF7f6dGcOHK7GGzxhjiWKPz85B9AGAE=",
"shasum": "GVN0FD0c4xnr+osY4rjRvF/KSGBgVC2fccbLwzGoFnk=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/bip44/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "9sGVcur+9HHb7S6RtXi2CYtGyGfazy4Up5wB4h0RuLs=",
"shasum": "j9j34JRDV5P98XgonRGfiqRSntlcaM4P53Z/S1g/XxA=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "Rbm3Ojr+A+CYpapp0iQd90ZSyIDddc5LHNfjpp+6m00=",
"shasum": "AVhrthHcnFfQFZgbhwiIzjbqzRW7HWRiPKHkv+Fu+fA=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/browserify/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "zsFF4XVvpIjSLdxQl/8LhwjGC24l2mRBtKZuKCV2jD0=",
"shasum": "2FquW6bL4OaB6c97+QdgLoVQCBZv22QanqtU+LzmndE=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "IAkJ3r8AIaUfShFACWI9zzyRPDLyf4PbLEx4WbmVmc8=",
"shasum": "935lBT4lhnqdiUEnatcORNsAEjSfMRmMz0HT2KJK6yg=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/cronjobs/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "wBvHA1GYvp9HmWoYD4ZBMD84hfJRB5hB1qTS+HGaqiE=",
"shasum": "Ory0F194oSN15zWAVA5Dyvzpg2LFoWbi0ylfI2qLVz4=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/dialogs/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "a1X+iXe4VL1J4AZNy0jkHrq0bY/Jnog9QZNdo2DfunA=",
"shasum": "4a7IfQp8AuCTx4BLTRow8IfZA0BArTuEb9CT8FLa3zE=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "0F0H8ZEQ0nLp60tV3h23pEPqEbt3eWfdEVxf2nFyIgo=",
"shasum": "25goBURWf+OrQTAgbwpuwN+TH/odY9fTHLDT/64oWvM=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/ethers-js/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "iViByV12FW1bFiRXDvQBqpYH60a62WACXh3Z3lL+xlM=",
"shasum": "vj40D2zP2bG8E7+ADfp8htEhYGgP1Z+8ThcvjyEoyOk=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/get-entropy/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "nY2+dap8Mtxzv5Hr9qNbkofQ3NpniVHb++BdfrfZlSQ=",
"shasum": "GHUM2ZesXFlhKOPU4mZ4Fty2qRln9aUuqHbVihttUKo=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/get-file/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "x4KFuj9D0sfxdPCjcfjKHswhpZr8EtLTKA9jKeXD4M0=",
"shasum": "ExzexStVLaw/chL4NySLzoH0UAHpw8oSmf7PjP/P1fY=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/home-page/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "AmglwjCexdFOeMvg9m1QG/qCO7s0G3k1Wu1D8+5QBlM=",
"shasum": "FOe+60S6JcvSTyawpkPqd5ZsPmpqEWY1xG524iMMNKk=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/images/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "2riIfMwei7wEIb7WhllO7jFkYGNw/XWGjeUqaB6GyLU=",
"shasum": "ehTebDIqhb6jIhvvYnh8x6VLUmu9TmZLwGpWh5CmbMA=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "Neb6FMQMVgpVVkDcKSCZxegtcplgebs2yw3uHxT3JCQ=",
"shasum": "NaByhc+fxmIG7PPdMjC6gH86rkKftx0/b3cwXc3XliA=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
Form,
Input,
Dropdown,
DropdownOption,
Option,
} from '@metamask/snaps-sdk/jsx';

export const InteractiveForm: SnapComponent = () => {
Expand All @@ -20,9 +20,9 @@ export const InteractiveForm: SnapComponent = () => {
</Field>
<Field label="Example Dropdown">
<Dropdown name="example-dropdown">
<DropdownOption value="option1">Option 1</DropdownOption>
<DropdownOption value="option2">Option 2</DropdownOption>
<DropdownOption value="option3">Option 3</DropdownOption>
<Option value="option1">Option 1</Option>
<Option value="option2">Option 2</Option>
<Option value="option3">Option 3</Option>
</Dropdown>
</Field>
<Button type="submit" name="submit">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "1CuOUFqC5G/wgBJDHUBk+xW9ATgBKFsXNtI9D9pO4aY=",
"shasum": "dMnmXtz6qjVPnvfPCjLI3jcU/TiR3gN6qhp/y0La5uI=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "keNEs4pesk7bKOKVORmA3NGxxNZkt/Ikk+qssCXcNp4=",
"shasum": "IR1h1od8fD/rVtnohzFC8zz4XP3S+K/KOYcCR/V4hOU=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/json-rpc/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "+aiomcpwkr8LIVVaFUnHT1c8+30Ym8Fa6bqHa8ek+y0=",
"shasum": "Zh19stzSbkk4e0rl3mnZ69x6c1Ij+PEfJ3VGLcY1wEI=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/jsx/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "MFFLgYGhSJlJ5I8JJsKcXFCI4UFYAbrGf+QNUMhvRGk=",
"shasum": "yqVsBhPZiHirCgF8KkdbvA5uMKdP4JsYipRTGFQ4kf8=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "VgVXeTn6yQ+gzvq8cSaz7zsBAxZ0xJPXNdTvQt71hVk=",
"shasum": "ADZ5fA/qc6b9sLivha59OaZ8Q+/nvm2Br8QI8uTiMFQ=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/localization/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "X4xkZ6Fea3Z1Ey6+nKyTFYe8oI5f8U0rOCZPIQdtqh8=",
"shasum": "K9QSwxnBwkz0Zf2tA8HWhNiuWJp6DGaD8UhgvtVtENE=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/manage-state/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "LmoEfrCUiEgeXglgfe6mSbMTJ+I3rm/Xst/YB861DZk=",
"shasum": "g/Wi1iKD5OHqHBMHGAZJxx9BXJK3DVpt7401DP5vxiA=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "4g1PLSrIvQDDD502ZqO13Nhm7V//Y2V2KVoNR9QZ/l8=",
"shasum": "3rJJn2lKBzyAgCn9J3m6XflIryIAT4qMqyhmGIL/tnE=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "DR/Pwq0vy8L7T39CSGPYUCh8FdwzkcE9HiS0N14hLlQ=",
"shasum": "ta+iT3ThiGeJcfTy1DaDq5tOHJ6B7kweRWujb8hQzsc=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "txFjaexvEDCIGNF9zsGJzdfQp/iZ8eO0TMJGuEIXwOs=",
"shasum": "0cIQp4wDFLHahG8XiwmCcEcQc2ZiY0kBuOV0MBmc9yo=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "WefCdzFcU9XNhTm4NK8o/s4XT/wXyj8RlRM7LA4bwsY=",
"shasum": "kSmphocy6yvQmcbeEAdVxF1WEEJw/wQbRyWEgViyYQo=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "9xgQHlUd4veKe3luu7M8tVmuHw0ZOIjlQYKOIjN2LuU=",
"shasum": "1IdcaOOx96qPQYfTZTRM7brevrP9jpCuxqxaGs0H+Bc=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/examples/packages/wasm/snap.manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "6Mbq9yf0IbE1to/tUfyDSOXq/37LJVqnYK8uKet0Q3U=",
"shasum": "1PbMUDBzJvOO4kM1VIMsnJCXbQT5A3vt9Hh3gboTsyo=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/MetaMask/snaps.git"
},
"source": {
"shasum": "lHZY/AroUklVMhNzJtnn8mesBaNkSpu5PdIue+iBhqw=",
"shasum": "Eli9yqWMDpM34s1qfBJ5vjBZfkerVJqJyCvgp1Xsmoo=",
"location": {
"npm": {
"filePath": "dist/bundle.js",
Expand Down
10 changes: 5 additions & 5 deletions packages/snaps-controllers/src/interface/utils.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
Box,
Button,
Dropdown,
DropdownOption,
Option,
Field,
Form,
Input,
Expand Down Expand Up @@ -236,8 +236,8 @@ describe('constructState', () => {
const element = (
<Box>
<Dropdown name="foo" value="option2">
<DropdownOption value="option1">Option 1</DropdownOption>
<DropdownOption value="option2">Option 2</DropdownOption>
<Option value="option1">Option 1</Option>
<Option value="option2">Option 2</Option>
</Dropdown>
</Box>
);
Expand All @@ -254,8 +254,8 @@ describe('constructState', () => {
<Form name="form">
<Field label="foo">
<Dropdown name="foo" value="option2">
<DropdownOption value="option1">Option 1</DropdownOption>
<DropdownOption value="option2">Option 2</DropdownOption>
<Option value="option1">Option 1</Option>
<Option value="option2">Option 2</Option>
</Dropdown>
</Field>
</Form>
Expand Down
6 changes: 3 additions & 3 deletions packages/snaps-jest/src/internals/request.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { SnapInterfaceController } from '@metamask/snaps-controllers';
import type { SnapId } from '@metamask/snaps-sdk';
import { UserInputEventType, button, input, text } from '@metamask/snaps-sdk';
import { Dropdown, DropdownOption } from '@metamask/snaps-sdk/jsx';
import { Dropdown, Option } from '@metamask/snaps-sdk/jsx';
import { getJsxElementFromComponent, HandlerType } from '@metamask/snaps-utils';
import { MOCK_SNAP_ID } from '@metamask/snaps-utils/test-utils';

Expand Down Expand Up @@ -345,8 +345,8 @@ describe('getInterfaceApi', () => {

const content = (
<Dropdown name="foo">
<DropdownOption value="option1">Option 1</DropdownOption>
<DropdownOption value="option2">Option 2</DropdownOption>
<Option value="option1">Option 1</Option>
<Option value="option2">Option 2</Option>
</Dropdown>
);

Expand Down
14 changes: 7 additions & 7 deletions packages/snaps-jest/src/internals/simulation/interface.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
Button,
Text,
Dropdown,
DropdownOption,
Option,
Box,
Input,
} from '@metamask/snaps-sdk/jsx';
Expand Down Expand Up @@ -587,8 +587,8 @@ describe('selectInDropdown', () => {

const content = (
<Dropdown name="foo">
<DropdownOption value="option1">Option 1</DropdownOption>
<DropdownOption value="option2">Option 2</DropdownOption>
<Option value="option1">Option 1</Option>
<Option value="option2">Option 2</Option>
</Dropdown>
);

Expand Down Expand Up @@ -634,8 +634,8 @@ describe('selectInDropdown', () => {
it('throws if selected option does not exist', async () => {
const content = (
<Dropdown name="foo">
<DropdownOption value="option1">Option 1</DropdownOption>
<DropdownOption value="option2">Option 2</DropdownOption>
<Option value="option1">Option 1</Option>
<Option value="option2">Option 2</Option>
</Dropdown>
);

Expand Down Expand Up @@ -860,8 +860,8 @@ describe('getInterface', () => {

const content = (
<Dropdown name="foo">
<DropdownOption value="option1">Option 1</DropdownOption>
<DropdownOption value="option2">Option 2</DropdownOption>
<Option value="option1">Option 1</Option>
<Option value="option2">Option 2</Option>
</Dropdown>
);
const id = await interfaceController.createInterface(MOCK_SNAP_ID, content);
Expand Down
Loading

0 comments on commit e322bae

Please sign in to comment.