mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
replacing deprecated Box component and updating story (#20301)
Co-authored-by: George Marshall <george.marshall@consensys.net> Co-authored-by: Garrett Bear <gwhisten@gmail.com>
This commit is contained in:
parent
7c2f7671b0
commit
63d67f3d2f
@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
|
|||||||
import { getWeightedPermissions } from '../../../../helpers/utils/permission';
|
import { getWeightedPermissions } from '../../../../helpers/utils/permission';
|
||||||
import { useI18nContext } from '../../../../hooks/useI18nContext';
|
import { useI18nContext } from '../../../../hooks/useI18nContext';
|
||||||
import PermissionCell from '../../permission-cell';
|
import PermissionCell from '../../permission-cell';
|
||||||
import Box from '../../../ui/box';
|
import { Box } from '../../../component-library';
|
||||||
|
|
||||||
export default function UpdateSnapPermissionList({
|
export default function UpdateSnapPermissionList({
|
||||||
approvedPermissions,
|
approvedPermissions,
|
||||||
|
@ -2,50 +2,65 @@ import React from 'react';
|
|||||||
import UpdateSnapPermissionList from './update-snap-permission-list';
|
import UpdateSnapPermissionList from './update-snap-permission-list';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: 'Components/App/UpdateSnapPermissionList',
|
title: 'Components/App/Snaps/UpdateSnapPermissionList',
|
||||||
component: UpdateSnapPermissionList,
|
component: UpdateSnapPermissionList,
|
||||||
|
|
||||||
argTypes: {
|
argTypes: {
|
||||||
permissions: {
|
approvedPermissions: {
|
||||||
control: 'object',
|
control: 'object',
|
||||||
},
|
},
|
||||||
|
revokedPermissions: {
|
||||||
|
control: 'object',
|
||||||
|
},
|
||||||
|
newPermissions: {
|
||||||
|
control: 'object',
|
||||||
|
},
|
||||||
|
targetSubjectMetadata: {
|
||||||
|
control: 'object',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
args: {
|
||||||
|
approvedPermissions: {
|
||||||
|
'endowment:network-access': {
|
||||||
|
date: 1620710693178,
|
||||||
|
},
|
||||||
|
snap_getBip32PublicKey: {
|
||||||
|
date: 1620710693178,
|
||||||
|
caveats: [
|
||||||
|
{
|
||||||
|
value: [
|
||||||
|
{
|
||||||
|
path: ['m', `44'`, `0'`],
|
||||||
|
curve: 'secp256k1',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
revokedPermissions: {
|
||||||
|
snap_notify: {
|
||||||
|
date: 1620710693178,
|
||||||
|
},
|
||||||
|
eth_accounts: {
|
||||||
|
date: 1620710693178,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
newPermissions: {
|
||||||
|
snap_dialog: {
|
||||||
|
date: 1620710693178,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
targetSubjectMetadata: {
|
||||||
|
extensionId: null,
|
||||||
|
iconUrl: null,
|
||||||
|
name: 'TypeScript Example Snap',
|
||||||
|
origin: 'local:http://localhost:8080',
|
||||||
|
subjectType: 'snap',
|
||||||
|
version: '0.2.2',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export const DefaultStory = (args) => <UpdateSnapPermissionList {...args} />;
|
export const DefaultStory = (args) => <UpdateSnapPermissionList {...args} />;
|
||||||
|
|
||||||
DefaultStory.storyName = 'Default';
|
DefaultStory.storyName = 'Default';
|
||||||
|
|
||||||
DefaultStory.args = {
|
|
||||||
approvedPermissions: {
|
|
||||||
'endowment:network-access': {
|
|
||||||
date: 1620710693178,
|
|
||||||
},
|
|
||||||
snap_getBip32PublicKey: {
|
|
||||||
date: 1620710693178,
|
|
||||||
caveats: [
|
|
||||||
{
|
|
||||||
value: [
|
|
||||||
{
|
|
||||||
path: ['m', `44'`, `0'`],
|
|
||||||
curve: 'secp256k1',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
revokedPermissions: {
|
|
||||||
snap_notify: {
|
|
||||||
date: 1620710693178,
|
|
||||||
},
|
|
||||||
eth_accounts: {
|
|
||||||
date: 1620710693178,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
newPermissions: {
|
|
||||||
snap_dialog: {
|
|
||||||
date: 1620710693178,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user