1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 01:47:00 +01:00

Added storybook check to CI (#17092)

* added storybook test runner

* added test runner in ci

* updated test for ci and fixed lint error

* updated lavamoat policy

* updated test command

* updated playwright

* changed command to storybook;ci

* updated command

* updated instance for test-storybook

* updated playwright

* added playwright step

* replaced concurrently with start-server-and-test

* updated the static storybook directory

* replaced first with last

* updated lock file

* replaced first with last

* updated test-storybook with maxworkers

* updated .depchechrc

* updated yml

* removed id from banner base

* replaced broken stories with .stories-to-do.js extesnsion

* updated token allowance story

* removed duplicacies from yarn

* fixed lavamoat

* removed filename comment

* updated links for docs

* fixed file extension for stories

* updated path for stories.json

* updated stories.json path

* yarn updated

* updated stories

* updated yarn

* updated wait on
This commit is contained in:
Nidhi Kumari 2023-01-21 00:57:46 +05:30 committed by GitHub
parent b310c6dcca
commit c5368c152b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
293 changed files with 2565 additions and 1136 deletions

View File

@ -111,6 +111,10 @@ workflows:
- test-unit-global: - test-unit-global:
requires: requires:
- prep-deps - prep-deps
- test-storybook:
requires:
- prep-deps
- prep-build-storybook
- validate-source-maps: - validate-source-maps:
requires: requires:
- prep-build - prep-build
@ -154,6 +158,7 @@ workflows:
- test-e2e-firefox - test-e2e-firefox
- test-e2e-chrome-snaps - test-e2e-chrome-snaps
- test-e2e-firefox-snaps - test-e2e-firefox-snaps
- test-storybook
- benchmark: - benchmark:
requires: requires:
- prep-build-test - prep-build-test
@ -511,6 +516,19 @@ jobs:
name: Verify locales name: Verify locales
command: yarn verify-locales --quiet command: yarn verify-locales --quiet
test-storybook:
executor: node-browsers-medium-plus
steps:
- checkout
- attach_workspace:
at: .
- run:
name: Install Playwright browsers
command: yarn dlx playwright install
- run:
name: Test Storybook
command: yarn test-storybook:ci
test-lint-shellcheck: test-lint-shellcheck:
executor: shellcheck executor: shellcheck
steps: steps:

View File

@ -34,6 +34,8 @@ ignores:
- 'lavamoat-viz' - 'lavamoat-viz'
- 'prettier-plugin-sort-json' # automatically imported by prettier - 'prettier-plugin-sort-json' # automatically imported by prettier
- 'source-map-explorer' - 'source-map-explorer'
- 'playwright'
- 'wait-on'
# development tool # development tool
- 'improved-yarn-audit' - 'improved-yarn-audit'
- 'nyc' - 'nyc'

View File

@ -32,7 +32,7 @@ import MyComponent from '.';
export default { export default {
title: 'Components/UI/MyComponent', // title should follow the folder structure location of the component. Don't use spaces. title: 'Components/UI/MyComponent', // title should follow the folder structure location of the component. Don't use spaces.
id: __filename,
}; };
export const DefaultStory = () => <MyComponent />; export const DefaultStory = () => <MyComponent />;
@ -59,7 +59,6 @@ export default {
// The `title` effects the components tile and location in storybook // The `title` effects the components tile and location in storybook
// It should follow the folder structure location of the component. Don't use spaces. // It should follow the folder structure location of the component. Don't use spaces.
title: 'Components/UI/Button', title: 'Components/UI/Button',
id: __filename, // The file name id is used to track what storybook files have changed in CI
component: Button, // The component you are documenting component: Button, // The component you are documenting
parameters: { parameters: {
docs: { docs: {

View File

@ -9,6 +9,7 @@ module.exports = {
core: { core: {
builder: 'webpack5', builder: 'webpack5',
}, },
features: { buildStoriesJson: true },
stories: [ stories: [
'../ui/**/*.stories.js', '../ui/**/*.stories.js',
'../ui/**/*.stories.mdx', '../ui/**/*.stories.mdx',

View File

@ -1,11 +1,16 @@
const path = require('path'); const path = require('path');
const { promisify } = require('util'); const { promisify } = require('util');
const exec = promisify(require('child_process').exec); const exec = promisify(require('child_process').exec);
const fs = require('fs');
const dependencyTree = require('dependency-tree'); const dependencyTree = require('dependency-tree');
const stories = fs.readFileSync(
path.join(__dirname, '..', '..', 'storybook-build', 'stories.json'),
'utf8',
);
const cwd = process.cwd(); const cwd = process.cwd();
const resolutionCache = {}; const resolutionCache = {};
// 1. load stories // 1. load stories
// 2. load list per story // 2. load list per story
// 3. filter against files // 3. filter against files
@ -65,27 +70,22 @@ async function getLocalDependencyList(filename) {
} }
function urlForStoryFile(filename, artifactBase) { function urlForStoryFile(filename, artifactBase) {
const storyId = sanitize(filename); const storyId = getStoryId(filename);
return `${artifactBase}/storybook/index.html?path=/story/${storyId}`; return `${artifactBase}/storybook/index.html?path=/story/${storyId}`;
} }
/** /**
* Remove punctuation and illegal characters from a story ID. * @param {fileName} string - The fileName to get the story id.
* See: * @returns The id of the story.
* https://gist.github.com/davidjrice/9d2af51100e41c6c4b4a
* https://github.com/ComponentDriven/csf/blame/7ac941eee85816a4c567ca85460731acb5360f50/src/index.ts
*
* @param {string} string - The string to sanitize.
* @returns The sanitized string.
*/ */
function sanitize(string) {
return ( function getStoryId(fileName) {
string const storiesArray = Object.values(stories.stories);
.toLowerCase() const foundStory = storiesArray.find((story) => {
// eslint-disable-next-line no-useless-escape return story.importPath.includes(fileName);
.replace(/[ ’–—―′¿'`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/]/giu, '-') });
.replace(/-+/gu, '-') if (!foundStory) {
.replace(/^-+/u, '') throw new Error(`story for ${fileName} not found`);
.replace(/-+$/u, '') }
); return foundStory.id;
} }

View File

@ -92,6 +92,7 @@
"@babel/core>@babel/helper-compilation-targets>semver": true, "@babel/core>@babel/helper-compilation-targets>semver": true,
"@babel/preset-env>@babel/compat-data": true, "@babel/preset-env>@babel/compat-data": true,
"@babel/preset-env>@babel/helper-validator-option": true, "@babel/preset-env>@babel/helper-validator-option": true,
"mockttp>@httptoolkit/proxy-agent>lru-cache": true,
"webpack>browserslist": true "webpack>browserslist": true
} }
}, },
@ -357,6 +358,7 @@
"packages": { "packages": {
"@babel/core": true, "@babel/core": true,
"@babel/core>@babel/helper-compilation-targets": true, "@babel/core>@babel/helper-compilation-targets": true,
"@babel/preset-env>@babel/compat-data": true,
"@babel/preset-env>@babel/helper-plugin-utils": true, "@babel/preset-env>@babel/helper-plugin-utils": true,
"@babel/preset-env>@babel/plugin-syntax-object-rest-spread": true, "@babel/preset-env>@babel/plugin-syntax-object-rest-spread": true,
"@babel/preset-env>@babel/plugin-transform-parameters": true "@babel/preset-env>@babel/plugin-transform-parameters": true
@ -530,6 +532,7 @@
"@babel/preset-env>@babel/plugin-transform-classes": { "@babel/preset-env>@babel/plugin-transform-classes": {
"packages": { "packages": {
"@babel/core": true, "@babel/core": true,
"@babel/core>@babel/helper-compilation-targets": true,
"@babel/preset-env>@babel/helper-plugin-utils": true, "@babel/preset-env>@babel/helper-plugin-utils": true,
"@babel/preset-env>@babel/plugin-transform-classes>@babel/helper-annotate-as-pure": true, "@babel/preset-env>@babel/plugin-transform-classes>@babel/helper-annotate-as-pure": true,
"@babel/preset-env>@babel/plugin-transform-classes>@babel/helper-optimise-call-expression": true, "@babel/preset-env>@babel/plugin-transform-classes>@babel/helper-optimise-call-expression": true,
@ -552,6 +555,7 @@
}, },
"@babel/preset-env>@babel/plugin-transform-classes>@babel/helper-replace-supers": { "@babel/preset-env>@babel/plugin-transform-classes>@babel/helper-replace-supers": {
"packages": { "packages": {
"@babel/core>@babel/template": true,
"@babel/core>@babel/types": true, "@babel/core>@babel/types": true,
"@babel/preset-env>@babel/plugin-transform-classes>@babel/helper-optimise-call-expression": true, "@babel/preset-env>@babel/plugin-transform-classes>@babel/helper-optimise-call-expression": true,
"@babel/preset-env>@babel/plugin-transform-classes>@babel/helper-replace-supers>@babel/helper-member-expression-to-functions": true, "@babel/preset-env>@babel/plugin-transform-classes>@babel/helper-replace-supers>@babel/helper-member-expression-to-functions": true,
@ -674,8 +678,7 @@
"packages": { "packages": {
"@babel/core": true, "@babel/core": true,
"@babel/core>@babel/helper-module-transforms": true, "@babel/core>@babel/helper-module-transforms": true,
"@babel/preset-env>@babel/helper-plugin-utils": true, "@babel/preset-env>@babel/helper-plugin-utils": true
"@babel/preset-env>@babel/plugin-transform-modules-amd>babel-plugin-dynamic-import-node": true
} }
}, },
"@babel/preset-env>@babel/plugin-transform-modules-commonjs": { "@babel/preset-env>@babel/plugin-transform-modules-commonjs": {
@ -683,8 +686,7 @@
"@babel/core": true, "@babel/core": true,
"@babel/core>@babel/helper-module-transforms": true, "@babel/core>@babel/helper-module-transforms": true,
"@babel/core>@babel/helper-module-transforms>@babel/helper-simple-access": true, "@babel/core>@babel/helper-module-transforms>@babel/helper-simple-access": true,
"@babel/preset-env>@babel/helper-plugin-utils": true, "@babel/preset-env>@babel/helper-plugin-utils": true
"@babel/preset-env>@babel/plugin-transform-modules-amd>babel-plugin-dynamic-import-node": true
} }
}, },
"@babel/preset-env>@babel/plugin-transform-modules-systemjs": { "@babel/preset-env>@babel/plugin-transform-modules-systemjs": {
@ -695,7 +697,6 @@
"@babel/core": true, "@babel/core": true,
"@babel/core>@babel/helper-module-transforms": true, "@babel/core>@babel/helper-module-transforms": true,
"@babel/preset-env>@babel/helper-plugin-utils": true, "@babel/preset-env>@babel/helper-plugin-utils": true,
"@babel/preset-env>@babel/plugin-transform-modules-amd>babel-plugin-dynamic-import-node": true,
"depcheck>@babel/traverse>@babel/helper-hoist-variables": true, "depcheck>@babel/traverse>@babel/helper-hoist-variables": true,
"lavamoat>@babel/highlight>@babel/helper-validator-identifier": true "lavamoat>@babel/highlight>@babel/helper-validator-identifier": true
} }
@ -862,17 +863,6 @@
"@babel/preset-env>babel-plugin-polyfill-corejs3>@babel/helper-define-polyfill-provider": true "@babel/preset-env>babel-plugin-polyfill-corejs3>@babel/helper-define-polyfill-provider": true
} }
}, },
"@babel/preset-env>core-js-compat": {
"packages": {
"@babel/preset-env>core-js-compat>semver": true
}
},
"@babel/preset-env>core-js-compat>semver": {
"globals": {
"console.error": true,
"process": true
}
},
"@babel/preset-env>semver": { "@babel/preset-env>semver": {
"globals": { "globals": {
"console": true, "console": true,
@ -1122,6 +1112,13 @@
"@metamask/jazzicon>color>color-convert>color-name": true "@metamask/jazzicon>color>color-convert>color-name": true
} }
}, },
"@sentry/cli>mkdirp": {
"builtin": {
"fs": true,
"path.dirname": true,
"path.resolve": true
}
},
"@storybook/api>telejson>is-symbol": { "@storybook/api>telejson>is-symbol": {
"packages": { "packages": {
"string.prototype.matchall>has-symbols": true "string.prototype.matchall>has-symbols": true
@ -2571,7 +2568,7 @@
"packages": { "packages": {
"eslint-plugin-import>tsconfig-paths>json5": true, "eslint-plugin-import>tsconfig-paths>json5": true,
"eslint-plugin-import>tsconfig-paths>strip-bom": true, "eslint-plugin-import>tsconfig-paths>strip-bom": true,
"react-devtools>minimist": true "wait-on>minimist": true
} }
}, },
"eslint-plugin-import>tsconfig-paths>json5": { "eslint-plugin-import>tsconfig-paths>json5": {
@ -4350,17 +4347,12 @@
"util.inspect": true "util.inspect": true
}, },
"packages": { "packages": {
"gulp-watch>chokidar>braces>fill-range>extend-shallow": true, "gulp-watch>chokidar>braces>extend-shallow": true,
"gulp-watch>chokidar>braces>fill-range>is-number": true, "gulp-watch>chokidar>braces>fill-range>is-number": true,
"gulp-watch>chokidar>braces>fill-range>to-regex-range": true, "gulp-watch>chokidar>braces>fill-range>to-regex-range": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>repeat-string": true "stylelint>@stylelint/postcss-markdown>remark>remark-parse>repeat-string": true
} }
}, },
"gulp-watch>chokidar>braces>fill-range>extend-shallow": {
"packages": {
"gulp-watch>chokidar>braces>extend-shallow>is-extendable": true
}
},
"gulp-watch>chokidar>braces>fill-range>is-number": { "gulp-watch>chokidar>braces>fill-range>is-number": {
"packages": { "packages": {
"gulp-watch>chokidar>braces>fill-range>is-number>kind-of": true "gulp-watch>chokidar>braces>fill-range>is-number>kind-of": true
@ -4387,10 +4379,10 @@
"__filename": true "__filename": true
}, },
"packages": { "packages": {
"gulp-watch>chokidar>braces>extend-shallow": true,
"gulp-watch>chokidar>braces>snapdragon>base": true, "gulp-watch>chokidar>braces>snapdragon>base": true,
"gulp-watch>chokidar>braces>snapdragon>debug": true, "gulp-watch>chokidar>braces>snapdragon>debug": true,
"gulp-watch>chokidar>braces>snapdragon>define-property": true, "gulp-watch>chokidar>braces>snapdragon>define-property": true,
"gulp-watch>chokidar>braces>snapdragon>extend-shallow": true,
"gulp-watch>chokidar>braces>snapdragon>map-cache": true, "gulp-watch>chokidar>braces>snapdragon>map-cache": true,
"gulp-watch>chokidar>braces>snapdragon>source-map": true, "gulp-watch>chokidar>braces>snapdragon>source-map": true,
"gulp-watch>chokidar>braces>snapdragon>use": true, "gulp-watch>chokidar>braces>snapdragon>use": true,
@ -4496,16 +4488,11 @@
"gulp-watch>chokidar>braces>snapdragon>base>cache-base>set-value": { "gulp-watch>chokidar>braces>snapdragon>base>cache-base>set-value": {
"packages": { "packages": {
"@babel/register>clone-deep>is-plain-object": true, "@babel/register>clone-deep>is-plain-object": true,
"gulp-watch>chokidar>braces>extend-shallow": true,
"gulp-watch>chokidar>braces>extend-shallow>is-extendable": true, "gulp-watch>chokidar>braces>extend-shallow>is-extendable": true,
"gulp-watch>chokidar>braces>snapdragon>base>cache-base>set-value>extend-shallow": true,
"gulp-watch>chokidar>braces>split-string": true "gulp-watch>chokidar>braces>split-string": true
} }
}, },
"gulp-watch>chokidar>braces>snapdragon>base>cache-base>set-value>extend-shallow": {
"packages": {
"gulp-watch>chokidar>braces>extend-shallow>is-extendable": true
}
},
"gulp-watch>chokidar>braces>snapdragon>base>cache-base>to-object-path": { "gulp-watch>chokidar>braces>snapdragon>base>cache-base>to-object-path": {
"packages": { "packages": {
"gulp-watch>chokidar>braces>snapdragon>base>cache-base>to-object-path>kind-of": true "gulp-watch>chokidar>braces>snapdragon>base>cache-base>to-object-path>kind-of": true
@ -4637,11 +4624,6 @@
"browserify>insert-module-globals>is-buffer": true "browserify>insert-module-globals>is-buffer": true
} }
}, },
"gulp-watch>chokidar>braces>snapdragon>extend-shallow": {
"packages": {
"gulp-watch>chokidar>braces>extend-shallow>is-extendable": true
}
},
"gulp-watch>chokidar>braces>snapdragon>use": { "gulp-watch>chokidar>braces>snapdragon>use": {
"packages": { "packages": {
"@babel/register>clone-deep>kind-of": true "@babel/register>clone-deep>kind-of": true
@ -4649,14 +4631,25 @@
}, },
"gulp-watch>chokidar>braces>split-string": { "gulp-watch>chokidar>braces>split-string": {
"packages": { "packages": {
"gulp-zip>plugin-error>extend-shallow": true "gulp-watch>chokidar>braces>split-string>extend-shallow": true
}
},
"gulp-watch>chokidar>braces>split-string>extend-shallow": {
"packages": {
"gulp-watch>chokidar>braces>split-string>extend-shallow>is-extendable": true,
"gulp-zip>plugin-error>extend-shallow>assign-symbols": true
}
},
"gulp-watch>chokidar>braces>split-string>extend-shallow>is-extendable": {
"packages": {
"@babel/register>clone-deep>is-plain-object": true
} }
}, },
"gulp-watch>chokidar>braces>to-regex": { "gulp-watch>chokidar>braces>to-regex": {
"packages": { "packages": {
"gulp-watch>chokidar>braces>to-regex>define-property": true, "gulp-watch>chokidar>braces>to-regex>define-property": true,
"gulp-watch>chokidar>braces>to-regex>extend-shallow": true,
"gulp-watch>chokidar>braces>to-regex>safe-regex": true, "gulp-watch>chokidar>braces>to-regex>safe-regex": true,
"gulp-zip>plugin-error>extend-shallow": true,
"gulp>gulp-cli>matchdep>micromatch>regex-not": true "gulp>gulp-cli>matchdep>micromatch>regex-not": true
} }
}, },
@ -4666,6 +4659,17 @@
"gulp>gulp-cli>matchdep>micromatch>define-property>is-descriptor": true "gulp>gulp-cli>matchdep>micromatch>define-property>is-descriptor": true
} }
}, },
"gulp-watch>chokidar>braces>to-regex>extend-shallow": {
"packages": {
"gulp-watch>chokidar>braces>to-regex>extend-shallow>is-extendable": true,
"gulp-zip>plugin-error>extend-shallow>assign-symbols": true
}
},
"gulp-watch>chokidar>braces>to-regex>extend-shallow>is-extendable": {
"packages": {
"@babel/register>clone-deep>is-plain-object": true
}
},
"gulp-watch>chokidar>braces>to-regex>safe-regex": { "gulp-watch>chokidar>braces>to-regex>safe-regex": {
"packages": { "packages": {
"enzyme>rst-selector-parser>nearley>randexp>ret": true "enzyme>rst-selector-parser>nearley>randexp>ret": true
@ -4846,10 +4850,10 @@
"gulp-watch>chokidar>braces>snapdragon": true, "gulp-watch>chokidar>braces>snapdragon": true,
"gulp-watch>chokidar>braces>to-regex": true, "gulp-watch>chokidar>braces>to-regex": true,
"gulp-watch>chokidar>readdirp>micromatch>define-property": true, "gulp-watch>chokidar>readdirp>micromatch>define-property": true,
"gulp-watch>chokidar>readdirp>micromatch>extglob": true, "gulp-watch>chokidar>readdirp>micromatch>extend-shallow": true,
"gulp-zip>plugin-error>arr-diff": true, "gulp-zip>plugin-error>arr-diff": true,
"gulp-zip>plugin-error>extend-shallow": true,
"gulp>gulp-cli>liftoff>fined>object.pick": true, "gulp>gulp-cli>liftoff>fined>object.pick": true,
"gulp>gulp-cli>matchdep>micromatch>extglob": true,
"gulp>gulp-cli>matchdep>micromatch>fragment-cache": true, "gulp>gulp-cli>matchdep>micromatch>fragment-cache": true,
"gulp>gulp-cli>matchdep>micromatch>nanomatch": true, "gulp>gulp-cli>matchdep>micromatch>nanomatch": true,
"gulp>gulp-cli>matchdep>micromatch>regex-not": true "gulp>gulp-cli>matchdep>micromatch>regex-not": true
@ -4861,97 +4865,15 @@
"gulp>gulp-cli>matchdep>micromatch>define-property>is-descriptor": true "gulp>gulp-cli>matchdep>micromatch>define-property>is-descriptor": true
} }
}, },
"gulp-watch>chokidar>readdirp>micromatch>extglob": { "gulp-watch>chokidar>readdirp>micromatch>extend-shallow": {
"packages": { "packages": {
"gulp-watch>chokidar>braces>array-unique": true, "gulp-watch>chokidar>readdirp>micromatch>extend-shallow>is-extendable": true,
"gulp-watch>chokidar>braces>snapdragon": true, "gulp-zip>plugin-error>extend-shallow>assign-symbols": true
"gulp-watch>chokidar>braces>to-regex": true,
"gulp-watch>chokidar>readdirp>micromatch>extglob>define-property": true,
"gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets": true,
"gulp-watch>chokidar>readdirp>micromatch>extglob>extend-shallow": true,
"gulp>gulp-cli>matchdep>micromatch>fragment-cache": true,
"gulp>gulp-cli>matchdep>micromatch>regex-not": true
} }
}, },
"gulp-watch>chokidar>readdirp>micromatch>extglob>define-property": { "gulp-watch>chokidar>readdirp>micromatch>extend-shallow>is-extendable": {
"packages": { "packages": {
"gulp>gulp-cli>matchdep>micromatch>define-property>is-descriptor": true "@babel/register>clone-deep>is-plain-object": true
}
},
"gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets": {
"globals": {
"__filename": true
},
"packages": {
"gulp-watch>chokidar>braces>snapdragon": true,
"gulp-watch>chokidar>braces>to-regex": true,
"gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>debug": true,
"gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property": true,
"gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>extend-shallow": true,
"gulp>gulp-cli>matchdep>micromatch>extglob>expand-brackets>posix-character-classes": true,
"gulp>gulp-cli>matchdep>micromatch>regex-not": true
}
},
"gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>debug": {
"builtin": {
"fs.SyncWriteStream": true,
"net.Socket": true,
"tty.WriteStream": true,
"tty.isatty": true,
"util": true
},
"globals": {
"chrome": true,
"console": true,
"document": true,
"localStorage": true,
"navigator": true,
"process": true
},
"packages": {
"gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>debug>ms": true
}
},
"gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property": {
"packages": {
"gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property>is-descriptor": true
}
},
"gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property>is-descriptor": {
"packages": {
"gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property>is-descriptor>is-accessor-descriptor": true,
"gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property>is-descriptor>is-data-descriptor": true,
"gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property>is-descriptor>kind-of": true
}
},
"gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property>is-descriptor>is-accessor-descriptor": {
"packages": {
"gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property>is-descriptor>is-accessor-descriptor>kind-of": true
}
},
"gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property>is-descriptor>is-accessor-descriptor>kind-of": {
"packages": {
"browserify>insert-module-globals>is-buffer": true
}
},
"gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property>is-descriptor>is-data-descriptor": {
"packages": {
"gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property>is-descriptor>is-data-descriptor>kind-of": true
}
},
"gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>define-property>is-descriptor>is-data-descriptor>kind-of": {
"packages": {
"browserify>insert-module-globals>is-buffer": true
}
},
"gulp-watch>chokidar>readdirp>micromatch>extglob>expand-brackets>extend-shallow": {
"packages": {
"gulp-watch>chokidar>braces>extend-shallow>is-extendable": true
}
},
"gulp-watch>chokidar>readdirp>micromatch>extglob>extend-shallow": {
"packages": {
"gulp-watch>chokidar>braces>extend-shallow>is-extendable": true
} }
}, },
"gulp-watch>chokidar>upath": { "gulp-watch>chokidar>upath": {
@ -5217,11 +5139,11 @@
"gulp-watch>chokidar>braces>snapdragon": true, "gulp-watch>chokidar>braces>snapdragon": true,
"gulp-watch>chokidar>braces>to-regex": true, "gulp-watch>chokidar>braces>to-regex": true,
"gulp-zip>plugin-error>arr-diff": true, "gulp-zip>plugin-error>arr-diff": true,
"gulp-zip>plugin-error>extend-shallow": true,
"gulp>glob-watcher>anymatch>micromatch>define-property": true, "gulp>glob-watcher>anymatch>micromatch>define-property": true,
"gulp>glob-watcher>anymatch>micromatch>extglob": true, "gulp>glob-watcher>anymatch>micromatch>extend-shallow": true,
"gulp>glob-watcher>chokidar>braces": true, "gulp>glob-watcher>chokidar>braces": true,
"gulp>gulp-cli>liftoff>fined>object.pick": true, "gulp>gulp-cli>liftoff>fined>object.pick": true,
"gulp>gulp-cli>matchdep>micromatch>extglob": true,
"gulp>gulp-cli>matchdep>micromatch>fragment-cache": true, "gulp>gulp-cli>matchdep>micromatch>fragment-cache": true,
"gulp>gulp-cli>matchdep>micromatch>nanomatch": true, "gulp>gulp-cli>matchdep>micromatch>nanomatch": true,
"gulp>gulp-cli>matchdep>micromatch>regex-not": true "gulp>gulp-cli>matchdep>micromatch>regex-not": true
@ -5233,97 +5155,15 @@
"gulp>gulp-cli>matchdep>micromatch>define-property>is-descriptor": true "gulp>gulp-cli>matchdep>micromatch>define-property>is-descriptor": true
} }
}, },
"gulp>glob-watcher>anymatch>micromatch>extglob": { "gulp>glob-watcher>anymatch>micromatch>extend-shallow": {
"packages": { "packages": {
"gulp-watch>chokidar>braces>array-unique": true, "gulp-zip>plugin-error>extend-shallow>assign-symbols": true,
"gulp-watch>chokidar>braces>snapdragon": true, "gulp>glob-watcher>anymatch>micromatch>extend-shallow>is-extendable": true
"gulp-watch>chokidar>braces>to-regex": true,
"gulp>glob-watcher>anymatch>micromatch>extglob>define-property": true,
"gulp>glob-watcher>anymatch>micromatch>extglob>expand-brackets": true,
"gulp>glob-watcher>anymatch>micromatch>extglob>extend-shallow": true,
"gulp>gulp-cli>matchdep>micromatch>fragment-cache": true,
"gulp>gulp-cli>matchdep>micromatch>regex-not": true
} }
}, },
"gulp>glob-watcher>anymatch>micromatch>extglob>define-property": { "gulp>glob-watcher>anymatch>micromatch>extend-shallow>is-extendable": {
"packages": { "packages": {
"gulp>gulp-cli>matchdep>micromatch>define-property>is-descriptor": true "@babel/register>clone-deep>is-plain-object": true
}
},
"gulp>glob-watcher>anymatch>micromatch>extglob>expand-brackets": {
"globals": {
"__filename": true
},
"packages": {
"gulp-watch>chokidar>braces>snapdragon": true,
"gulp-watch>chokidar>braces>to-regex": true,
"gulp>glob-watcher>anymatch>micromatch>extglob>expand-brackets>debug": true,
"gulp>glob-watcher>anymatch>micromatch>extglob>expand-brackets>define-property": true,
"gulp>glob-watcher>anymatch>micromatch>extglob>expand-brackets>extend-shallow": true,
"gulp>gulp-cli>matchdep>micromatch>extglob>expand-brackets>posix-character-classes": true,
"gulp>gulp-cli>matchdep>micromatch>regex-not": true
}
},
"gulp>glob-watcher>anymatch>micromatch>extglob>expand-brackets>debug": {
"builtin": {
"fs.SyncWriteStream": true,
"net.Socket": true,
"tty.WriteStream": true,
"tty.isatty": true,
"util": true
},
"globals": {
"chrome": true,
"console": true,
"document": true,
"localStorage": true,
"navigator": true,
"process": true
},
"packages": {
"gulp>glob-watcher>anymatch>micromatch>extglob>expand-brackets>debug>ms": true
}
},
"gulp>glob-watcher>anymatch>micromatch>extglob>expand-brackets>define-property": {
"packages": {
"gulp>glob-watcher>anymatch>micromatch>extglob>expand-brackets>define-property>is-descriptor": true
}
},
"gulp>glob-watcher>anymatch>micromatch>extglob>expand-brackets>define-property>is-descriptor": {
"packages": {
"gulp>glob-watcher>anymatch>micromatch>extglob>expand-brackets>define-property>is-descriptor>is-accessor-descriptor": true,
"gulp>glob-watcher>anymatch>micromatch>extglob>expand-brackets>define-property>is-descriptor>is-data-descriptor": true,
"gulp>glob-watcher>anymatch>micromatch>extglob>expand-brackets>define-property>is-descriptor>kind-of": true
}
},
"gulp>glob-watcher>anymatch>micromatch>extglob>expand-brackets>define-property>is-descriptor>is-accessor-descriptor": {
"packages": {
"gulp>glob-watcher>anymatch>micromatch>extglob>expand-brackets>define-property>is-descriptor>is-accessor-descriptor>kind-of": true
}
},
"gulp>glob-watcher>anymatch>micromatch>extglob>expand-brackets>define-property>is-descriptor>is-accessor-descriptor>kind-of": {
"packages": {
"browserify>insert-module-globals>is-buffer": true
}
},
"gulp>glob-watcher>anymatch>micromatch>extglob>expand-brackets>define-property>is-descriptor>is-data-descriptor": {
"packages": {
"gulp>glob-watcher>anymatch>micromatch>extglob>expand-brackets>define-property>is-descriptor>is-data-descriptor>kind-of": true
}
},
"gulp>glob-watcher>anymatch>micromatch>extglob>expand-brackets>define-property>is-descriptor>is-data-descriptor>kind-of": {
"packages": {
"browserify>insert-module-globals>is-buffer": true
}
},
"gulp>glob-watcher>anymatch>micromatch>extglob>expand-brackets>extend-shallow": {
"packages": {
"gulp-watch>chokidar>braces>extend-shallow>is-extendable": true
}
},
"gulp>glob-watcher>anymatch>micromatch>extglob>extend-shallow": {
"packages": {
"gulp-watch>chokidar>braces>extend-shallow>is-extendable": true
} }
}, },
"gulp>glob-watcher>anymatch>normalize-path": { "gulp>glob-watcher>anymatch>normalize-path": {
@ -5391,38 +5231,28 @@
"gulp>glob-watcher>chokidar>braces": { "gulp>glob-watcher>chokidar>braces": {
"packages": { "packages": {
"gulp-watch>chokidar>braces>array-unique": true, "gulp-watch>chokidar>braces>array-unique": true,
"gulp-watch>chokidar>braces>extend-shallow": true,
"gulp-watch>chokidar>braces>repeat-element": true, "gulp-watch>chokidar>braces>repeat-element": true,
"gulp-watch>chokidar>braces>snapdragon": true, "gulp-watch>chokidar>braces>snapdragon": true,
"gulp-watch>chokidar>braces>snapdragon-node": true, "gulp-watch>chokidar>braces>snapdragon-node": true,
"gulp-watch>chokidar>braces>split-string": true, "gulp-watch>chokidar>braces>split-string": true,
"gulp-watch>chokidar>braces>to-regex": true, "gulp-watch>chokidar>braces>to-regex": true,
"gulp>glob-watcher>chokidar>braces>extend-shallow": true,
"gulp>glob-watcher>chokidar>braces>fill-range": true, "gulp>glob-watcher>chokidar>braces>fill-range": true,
"gulp>gulp-cli>isobject": true, "gulp>gulp-cli>isobject": true,
"gulp>undertaker>arr-flatten": true "gulp>undertaker>arr-flatten": true
} }
}, },
"gulp>glob-watcher>chokidar>braces>extend-shallow": {
"packages": {
"gulp-watch>chokidar>braces>extend-shallow>is-extendable": true
}
},
"gulp>glob-watcher>chokidar>braces>fill-range": { "gulp>glob-watcher>chokidar>braces>fill-range": {
"builtin": { "builtin": {
"util.inspect": true "util.inspect": true
}, },
"packages": { "packages": {
"gulp>glob-watcher>chokidar>braces>fill-range>extend-shallow": true, "gulp-watch>chokidar>braces>extend-shallow": true,
"gulp>glob-watcher>chokidar>braces>fill-range>is-number": true, "gulp>glob-watcher>chokidar>braces>fill-range>is-number": true,
"gulp>glob-watcher>chokidar>braces>fill-range>to-regex-range": true, "gulp>glob-watcher>chokidar>braces>fill-range>to-regex-range": true,
"stylelint>@stylelint/postcss-markdown>remark>remark-parse>repeat-string": true "stylelint>@stylelint/postcss-markdown>remark>remark-parse>repeat-string": true
} }
}, },
"gulp>glob-watcher>chokidar>braces>fill-range>extend-shallow": {
"packages": {
"gulp-watch>chokidar>braces>extend-shallow>is-extendable": true
}
},
"gulp>glob-watcher>chokidar>braces>fill-range>is-number": { "gulp>glob-watcher>chokidar>braces>fill-range>is-number": {
"packages": { "packages": {
"gulp>glob-watcher>chokidar>braces>fill-range>is-number>kind-of": true "gulp>glob-watcher>chokidar>braces>fill-range>is-number>kind-of": true
@ -5528,6 +5358,57 @@
"@babel/register>clone-deep>kind-of": true "@babel/register>clone-deep>kind-of": true
} }
}, },
"gulp>gulp-cli>matchdep>micromatch>extglob": {
"packages": {
"gulp-watch>chokidar>braces>array-unique": true,
"gulp-watch>chokidar>braces>extend-shallow": true,
"gulp-watch>chokidar>braces>snapdragon": true,
"gulp-watch>chokidar>braces>to-regex": true,
"gulp>gulp-cli>matchdep>micromatch>extglob>define-property": true,
"gulp>gulp-cli>matchdep>micromatch>extglob>expand-brackets": true,
"gulp>gulp-cli>matchdep>micromatch>fragment-cache": true,
"gulp>gulp-cli>matchdep>micromatch>regex-not": true
}
},
"gulp>gulp-cli>matchdep>micromatch>extglob>define-property": {
"packages": {
"gulp>gulp-cli>matchdep>micromatch>define-property>is-descriptor": true
}
},
"gulp>gulp-cli>matchdep>micromatch>extglob>expand-brackets": {
"globals": {
"__filename": true
},
"packages": {
"gulp-watch>chokidar>braces>extend-shallow": true,
"gulp-watch>chokidar>braces>snapdragon": true,
"gulp-watch>chokidar>braces>snapdragon>define-property": true,
"gulp-watch>chokidar>braces>to-regex": true,
"gulp>gulp-cli>matchdep>micromatch>extglob>expand-brackets>debug": true,
"gulp>gulp-cli>matchdep>micromatch>extglob>expand-brackets>posix-character-classes": true,
"gulp>gulp-cli>matchdep>micromatch>regex-not": true
}
},
"gulp>gulp-cli>matchdep>micromatch>extglob>expand-brackets>debug": {
"builtin": {
"fs.SyncWriteStream": true,
"net.Socket": true,
"tty.WriteStream": true,
"tty.isatty": true,
"util": true
},
"globals": {
"chrome": true,
"console": true,
"document": true,
"localStorage": true,
"navigator": true,
"process": true
},
"packages": {
"gulp>gulp-cli>matchdep>micromatch>extglob>expand-brackets>debug>ms": true
}
},
"gulp>gulp-cli>matchdep>micromatch>fragment-cache": { "gulp>gulp-cli>matchdep>micromatch>fragment-cache": {
"packages": { "packages": {
"gulp-watch>chokidar>braces>snapdragon>map-cache": true "gulp-watch>chokidar>braces>snapdragon>map-cache": true
@ -5545,10 +5426,10 @@
"gulp-watch>chokidar>braces>snapdragon": true, "gulp-watch>chokidar>braces>snapdragon": true,
"gulp-watch>chokidar>braces>to-regex": true, "gulp-watch>chokidar>braces>to-regex": true,
"gulp-zip>plugin-error>arr-diff": true, "gulp-zip>plugin-error>arr-diff": true,
"gulp-zip>plugin-error>extend-shallow": true,
"gulp>gulp-cli>liftoff>fined>object.pick": true, "gulp>gulp-cli>liftoff>fined>object.pick": true,
"gulp>gulp-cli>matchdep>micromatch>fragment-cache": true, "gulp>gulp-cli>matchdep>micromatch>fragment-cache": true,
"gulp>gulp-cli>matchdep>micromatch>nanomatch>define-property": true, "gulp>gulp-cli>matchdep>micromatch>nanomatch>define-property": true,
"gulp>gulp-cli>matchdep>micromatch>nanomatch>extend-shallow": true,
"gulp>gulp-cli>matchdep>micromatch>nanomatch>is-odd": true, "gulp>gulp-cli>matchdep>micromatch>nanomatch>is-odd": true,
"gulp>gulp-cli>matchdep>micromatch>regex-not": true, "gulp>gulp-cli>matchdep>micromatch>regex-not": true,
"nyc>spawn-wrap>is-windows": true "nyc>spawn-wrap>is-windows": true
@ -5560,6 +5441,17 @@
"gulp>gulp-cli>matchdep>micromatch>define-property>is-descriptor": true "gulp>gulp-cli>matchdep>micromatch>define-property>is-descriptor": true
} }
}, },
"gulp>gulp-cli>matchdep>micromatch>nanomatch>extend-shallow": {
"packages": {
"gulp-zip>plugin-error>extend-shallow>assign-symbols": true,
"gulp>gulp-cli>matchdep>micromatch>nanomatch>extend-shallow>is-extendable": true
}
},
"gulp>gulp-cli>matchdep>micromatch>nanomatch>extend-shallow>is-extendable": {
"packages": {
"@babel/register>clone-deep>is-plain-object": true
}
},
"gulp>gulp-cli>matchdep>micromatch>nanomatch>is-odd": { "gulp>gulp-cli>matchdep>micromatch>nanomatch>is-odd": {
"packages": { "packages": {
"gulp>undertaker>bach>array-last>is-number": true "gulp>undertaker>bach>array-last>is-number": true
@ -5568,7 +5460,18 @@
"gulp>gulp-cli>matchdep>micromatch>regex-not": { "gulp>gulp-cli>matchdep>micromatch>regex-not": {
"packages": { "packages": {
"gulp-watch>chokidar>braces>to-regex>safe-regex": true, "gulp-watch>chokidar>braces>to-regex>safe-regex": true,
"gulp-zip>plugin-error>extend-shallow": true "gulp>gulp-cli>matchdep>micromatch>regex-not>extend-shallow": true
}
},
"gulp>gulp-cli>matchdep>micromatch>regex-not>extend-shallow": {
"packages": {
"gulp-zip>plugin-error>extend-shallow>assign-symbols": true,
"gulp>gulp-cli>matchdep>micromatch>regex-not>extend-shallow>is-extendable": true
}
},
"gulp>gulp-cli>matchdep>micromatch>regex-not>extend-shallow>is-extendable": {
"packages": {
"@babel/register>clone-deep>is-plain-object": true
} }
}, },
"gulp>gulp-cli>replace-homedir>is-absolute": { "gulp>gulp-cli>replace-homedir>is-absolute": {
@ -6380,13 +6283,6 @@
"stylelint>balanced-match": true "stylelint>balanced-match": true
} }
}, },
"mocha>mkdirp": {
"builtin": {
"fs": true,
"path.dirname": true,
"path.resolve": true
}
},
"mocha>supports-color": { "mocha>supports-color": {
"builtin": { "builtin": {
"os.release": true "os.release": true
@ -6434,6 +6330,11 @@
"process.platform": true "process.platform": true
} }
}, },
"mockttp>@httptoolkit/proxy-agent>lru-cache": {
"packages": {
"mockttp>@httptoolkit/proxy-agent>lru-cache>yallist": true
}
},
"nock>debug": { "nock>debug": {
"builtin": { "builtin": {
"tty.isatty": true, "tty.isatty": true,
@ -7278,7 +7179,7 @@
"path.dirname": true "path.dirname": true
}, },
"packages": { "packages": {
"mocha>mkdirp": true "@sentry/cli>mkdirp": true
} }
}, },
"stylelint>global-modules": { "stylelint>global-modules": {

View File

@ -83,7 +83,9 @@
"ts-migration:enumerate": "ts-node development/ts-migration-dashboard/scripts/write-list-of-files-to-convert.ts", "ts-migration:enumerate": "ts-node development/ts-migration-dashboard/scripts/write-list-of-files-to-convert.ts",
"ts-migration:dashboard:watch": "ts-node development/ts-migration-dashboard/scripts/build.ts --watch", "ts-migration:dashboard:watch": "ts-node development/ts-migration-dashboard/scripts/build.ts --watch",
"ts-migration:dashboard:build": "ts-node development/ts-migration-dashboard/scripts/build.ts", "ts-migration:dashboard:build": "ts-node development/ts-migration-dashboard/scripts/build.ts",
"ts-migration:dashboard:deploy": "gh-pages --dist development/ts-migration-dashboard/build --remote ts-migration-dashboard" "ts-migration:dashboard:deploy": "gh-pages --dist development/ts-migration-dashboard/build --remote ts-migration-dashboard",
"test-storybook": "test-storybook -c .storybook",
"test-storybook:ci": "concurrently -k -s first -n \"SB,TEST\" -c \"magenta,blue\" \"yarn storybook:build && npx http-server storybook-build --port 6006 \" \"wait-on tcp:6006 && yarn test-storybook --maxWorkers=2\""
}, },
"resolutions": { "resolutions": {
"analytics-node/axios": "^0.21.2", "analytics-node/axios": "^0.21.2",
@ -302,6 +304,7 @@
"nonce-tracker": "^1.0.0", "nonce-tracker": "^1.0.0",
"obj-multiplex": "^1.0.0", "obj-multiplex": "^1.0.0",
"pify": "^5.0.0", "pify": "^5.0.0",
"playwright": "^1.29.2",
"promise-to-callback": "^1.0.0", "promise-to-callback": "^1.0.0",
"prop-types": "^15.6.1", "prop-types": "^15.6.1",
"pubnub": "4.27.3", "pubnub": "4.27.3",
@ -336,6 +339,7 @@
"unicode-confusables": "^0.1.1", "unicode-confusables": "^0.1.1",
"uuid": "^8.3.2", "uuid": "^8.3.2",
"valid-url": "^1.0.9", "valid-url": "^1.0.9",
"wait-on": "^7.0.1",
"web3-stream-provider": "^4.0.0", "web3-stream-provider": "^4.0.0",
"zxcvbn": "^4.4.2" "zxcvbn": "^4.4.2"
}, },
@ -375,6 +379,7 @@
"@storybook/manager-webpack5": "^6.5.13", "@storybook/manager-webpack5": "^6.5.13",
"@storybook/react": "^6.5.13", "@storybook/react": "^6.5.13",
"@storybook/storybook-deployer": "^2.8.16", "@storybook/storybook-deployer": "^2.8.16",
"@storybook/test-runner": "^0.9.2",
"@storybook/theming": "^6.5.13", "@storybook/theming": "^6.5.13",
"@testing-library/jest-dom": "^5.11.10", "@testing-library/jest-dom": "^5.11.10",
"@testing-library/react": "^10.4.8", "@testing-library/react": "^10.4.8",
@ -573,7 +578,9 @@
"@keystonehq/metamask-airgapped-keyring>@keystonehq/base-eth-keyring>hdkey>secp256k1": false, "@keystonehq/metamask-airgapped-keyring>@keystonehq/base-eth-keyring>hdkey>secp256k1": false,
"@metamask/base-controller>simple-git-hooks": false, "@metamask/base-controller>simple-git-hooks": false,
"@storybook/core>@storybook/core-server>webpack>watchpack>watchpack-chokidar2>chokidar>fsevents": false, "@storybook/core>@storybook/core-server>webpack>watchpack>watchpack-chokidar2>chokidar>fsevents": false,
"resolve-url-loader>es6-iterator>es5-ext": false "resolve-url-loader>es6-iterator>es5-ext": false,
"@storybook/test-runner>playwright": true,
"playwright": false
} }
}, },
"packageManager": "yarn@3.2.4" "packageManager": "yarn@3.2.4"

View File

@ -6,7 +6,7 @@ import AccountListItem from '.';
Account List Item is referred for each account item on the Account List's component Account List Item is referred for each account item on the Account List's component
<Canvas> <Canvas>
<Story id="ui-components-app-account-list-item-account-list-item-stories-js--default-story" /> <Story id="components-app-accountlistitem--default-story" />
</Canvas> </Canvas>
## Props ## Props

View File

@ -4,7 +4,7 @@ import AccountListItem from './account-list-item';
export default { export default {
title: 'Components/App/AccountListItem', title: 'Components/App/AccountListItem',
id: __filename,
component: AccountListItem, component: AccountListItem,
parameters: { parameters: {
docs: { docs: {

View File

@ -10,7 +10,7 @@ const BSC_IMAGE_URL = './images/bsc-filled.svg';
export default { export default {
title: 'Components/APP/AddNetwork', title: 'Components/APP/AddNetwork',
id: __filename,
argTypes: { argTypes: {
onBackClick: { onBackClick: {
action: 'onBackClick', action: 'onBackClick',

View File

@ -4,7 +4,6 @@ import AdvancedGasControls from '.';
export default { export default {
title: 'Components/App/AdvancedGasControls', title: 'Components/App/AdvancedGasControls',
id: __filename,
}; };
export const DefaultStory = () => { export const DefaultStory = () => {

View File

@ -1,9 +1,10 @@
import React from 'react'; import React from 'react';
import AppHeader from '.'; import AppHeader from '.';
// eslint-disable-next-line import/no-anonymous-default-export
export default { export default {
title: 'Components/App/AppHeader', title: 'Components/App/AppHeader',
id: __filename,
argTypes: { argTypes: {
hideNetworkIndicator: { hideNetworkIndicator: {
control: 'boolean', control: 'boolean',

View File

@ -3,7 +3,7 @@ import ApproveContentCard from './approve-content-card';
export default { export default {
title: 'Components/App/ApproveContentCard', title: 'Components/App/ApproveContentCard',
id: __filename,
argTypes: { argTypes: {
showHeader: { showHeader: {
control: 'boolean', control: 'boolean',

View File

@ -10,7 +10,7 @@ const store = configureStore(testData);
export default { export default {
title: 'Components/App/AssetList/DetectedTokensLink', title: 'Components/App/AssetList/DetectedTokensLink',
decorators: [(story) => <Provider store={store}>{story()}</Provider>], decorators: [(story) => <Provider store={store}>{story()}</Provider>],
id: __filename,
argTypes: { argTypes: {
setShowDetectedTokens: { control: 'func' }, setShowDetectedTokens: { control: 'func' },
}, },

View File

@ -12,7 +12,6 @@ const store = configureStore({
export default { export default {
title: 'Components/App/BetaHeader', title: 'Components/App/BetaHeader',
decorators: [(story) => <Provider store={store}>{story()}</Provider>], decorators: [(story) => <Provider store={store}>{story()}</Provider>],
id: __filename,
}; };
export const DefaultStory = () => ( export const DefaultStory = () => (

View File

@ -3,7 +3,7 @@ import CollectibleDefaultImage from '.';
export default { export default {
title: 'Components/App/CollectibleDefaultImage', title: 'Components/App/CollectibleDefaultImage',
id: __filename,
argTypes: { argTypes: {
name: { name: {
control: 'text', control: 'text',

View File

@ -12,7 +12,7 @@ const collectible = {
export default { export default {
title: 'Components/App/CollectiblesDetail', title: 'Components/App/CollectiblesDetail',
id: __filename,
argTypes: { argTypes: {
collectible: { collectible: {
control: 'object', control: 'object',

View File

@ -3,7 +3,7 @@ import ConfirmDetailRow from '.';
export default { export default {
title: 'Components/App/ConfirmPageContainer/ConfirmDetailRow', title: 'Components/App/ConfirmPageContainer/ConfirmDetailRow',
id: __filename,
argTypes: { argTypes: {
headerText: { headerText: {
control: 'text', control: 'text',

View File

@ -3,7 +3,7 @@ import ConfirmPageContainerWarning from '.';
export default { export default {
title: 'Components/UI/ConfirmPageContainerWarning', // title should follow the folder structure location of the component. Don't use spaces. title: 'Components/UI/ConfirmPageContainerWarning', // title should follow the folder structure location of the component. Don't use spaces.
id: __filename,
argTypes: { argTypes: {
warning: { warning: {
control: 'text', control: 'text',

View File

@ -3,7 +3,7 @@ import ConfirmPageContainerHeader from '.';
export default { export default {
title: 'Components/App/ConfirmPageContainer/ConfirmPageContainerHeader', title: 'Components/App/ConfirmPageContainer/ConfirmPageContainerHeader',
id: __filename,
argTypes: { argTypes: {
accountAddress: { accountAddress: {
control: 'text', control: 'text',

View File

@ -3,7 +3,6 @@ import ConfirmationWarningModal from '.';
export default { export default {
title: 'Components/App/ConfirmationWarningModal', title: 'Components/App/ConfirmationWarningModal',
id: __filename,
}; };
export const DefaultStory = (args) => <ConfirmationWarningModal {...args} />; export const DefaultStory = (args) => <ConfirmationWarningModal {...args} />;

View File

@ -3,7 +3,7 @@ import ConnectedAccountsList from '.';
export default { export default {
title: 'Components/App/ConnectedAccountsList', title: 'Components/App/ConnectedAccountsList',
id: __filename,
argTypes: { argTypes: {
connectedAccounts: { connectedAccounts: {
control: 'array', control: 'array',

View File

@ -3,7 +3,7 @@ import CreateNewVault from '.';
export default { export default {
title: 'Components/App/CreateNewVault', title: 'Components/App/CreateNewVault',
id: __filename,
argTypes: { argTypes: {
disabled: { control: 'boolean' }, disabled: { control: 'boolean' },
submitText: { control: 'text' }, submitText: { control: 'text' },

View File

@ -3,7 +3,7 @@ import CurrencyInput from '.';
export default { export default {
title: 'Components/App/CurrencyInput', title: 'Components/App/CurrencyInput',
id: __filename,
argTypes: { argTypes: {
hexValue: { hexValue: {
control: 'text', control: 'text',

View File

@ -3,7 +3,7 @@ import CustomSpendingCap from './custom-spending-cap';
export default { export default {
title: 'Components/App/CustomSpendingCap', title: 'Components/App/CustomSpendingCap',
id: __filename,
argTypes: { argTypes: {
tokenName: { tokenName: {
control: { type: 'text' }, control: { type: 'text' },

View File

@ -4,7 +4,7 @@ import DetectedTokenAddress from './detected-token-address';
export default { export default {
title: 'Components/App/DetectedToken/DetectedTokenAddress', title: 'Components/App/DetectedToken/DetectedTokenAddress',
id: __filename,
argTypes: { argTypes: {
tokenAddress: { control: 'text' }, tokenAddress: { control: 'text' },
}, },

View File

@ -6,7 +6,7 @@ import DetectedTokenAggregators from './detected-token-aggregators';
export default { export default {
title: 'Components/App/DetectedToken/DetectedTokenAggregators', title: 'Components/App/DetectedToken/DetectedTokenAggregators',
id: __filename,
argTypes: { argTypes: {
aggregators: { control: 'array' }, aggregators: { control: 'array' },
}, },

View File

@ -4,7 +4,7 @@ import DetectedTokenDetails from './detected-token-details';
export default { export default {
title: 'Components/App/DetectedToken/DetectedTokenDetails', title: 'Components/App/DetectedToken/DetectedTokenDetails',
id: __filename,
argTypes: { argTypes: {
token: { control: 'object' }, token: { control: 'object' },
handleTokenSelection: { control: 'func' }, handleTokenSelection: { control: 'func' },

View File

@ -4,7 +4,7 @@ import DetectedTokenIgnoredPopover from './detected-token-ignored-popover';
export default { export default {
title: 'Components/App/DetectedToken/DetectedTokenIgnoredPopover', title: 'Components/App/DetectedToken/DetectedTokenIgnoredPopover',
id: __filename,
argTypes: { argTypes: {
onCancelIgnore: { onCancelIgnore: {
control: 'func', control: 'func',

View File

@ -10,7 +10,7 @@ const store = configureStore(testData);
export default { export default {
title: 'Components/App/DetectedToken/DetectedTokenSelectionPopover', title: 'Components/App/DetectedToken/DetectedTokenSelectionPopover',
decorators: [(story) => <Provider store={store}>{story()}</Provider>], decorators: [(story) => <Provider store={store}>{story()}</Provider>],
id: __filename,
argTypes: { argTypes: {
selectedTokens: { control: 'array' }, selectedTokens: { control: 'array' },
handleTokenSelection: { control: 'func' }, handleTokenSelection: { control: 'func' },

View File

@ -4,7 +4,7 @@ import DetectedTokenValues from './detected-token-values';
export default { export default {
title: 'Components/App/DetectedToken/DetectedTokenValues', title: 'Components/App/DetectedToken/DetectedTokenValues',
id: __filename,
argTypes: { argTypes: {
token: { control: 'object' }, token: { control: 'object' },
handleTokenSelection: { control: 'func' }, handleTokenSelection: { control: 'func' },

View File

@ -3,7 +3,7 @@ import EditGasDisplay from '.';
export default { export default {
title: 'Components/App/EditGasDisplay', title: 'Components/App/EditGasDisplay',
id: __filename,
args: { args: {
transaction: {}, transaction: {},
}, },

View File

@ -15,7 +15,7 @@ const store = configureStore(testData);
export default { export default {
title: 'Components/App/EditGasPopover', title: 'Components/App/EditGasPopover',
decorators: [(story) => <Provider store={store}>{story()}</Provider>], decorators: [(story) => <Provider store={store}>{story()}</Provider>],
id: __filename,
argTypes: { argTypes: {
editGasDisplayProps: { editGasDisplayProps: {
control: 'object', control: 'object',

View File

@ -4,7 +4,7 @@ import ExperimentalArea from '.';
export default { export default {
title: 'Components/App/Flask/ExperimentalArea', title: 'Components/App/Flask/ExperimentalArea',
id: __filename,
component: ExperimentalArea, component: ExperimentalArea,
}; };

View File

@ -4,7 +4,7 @@ import SnapContentFooter from '.';
export default { export default {
title: 'Components/App/Flask/SnapContentFooter', title: 'Components/App/Flask/SnapContentFooter',
id: __filename,
component: SnapContentFooter, component: SnapContentFooter,
args: { args: {
snapName: 'Test Snap', snapName: 'Test Snap',

View File

@ -3,7 +3,6 @@ import { SnapDelineator } from '.';
export default { export default {
title: 'Components/App/SnapDelineator', title: 'Components/App/SnapDelineator',
id: __filename,
}; };
export const DefaultStory = () => ( export const DefaultStory = () => (

View File

@ -7,7 +7,7 @@ import SnapSettingsCard from '.';
A card component that displays information and the status of a snap. The `SnapSettingsCard` component is made up of the `Card`, `IconBorder`, `IconWithFallback`, `ToggleButton`, `Chip`, `ColorIndicator` and `Button` components A card component that displays information and the status of a snap. The `SnapSettingsCard` component is made up of the `Card`, `IconBorder`, `IconWithFallback`, `ToggleButton`, `Chip`, `ColorIndicator` and `Button` components
<Canvas> <Canvas>
<Story id="ui-components-app-flask-snap-settings-card-snap-settings-card-stories-js--default-story" /> <Story id="components-app-flask-snapsettingscard--default-story" />
</Canvas> </Canvas>
## Props ## Props
@ -23,7 +23,7 @@ The following describes the props and example usage for this component.
There are 4 statuses the `SnapSettingsCard` can have: `'installing'`,`'running'`,`'stopped'` and `'crashed'`. There are 4 statuses the `SnapSettingsCard` can have: `'installing'`,`'running'`,`'stopped'` and `'crashed'`.
<Canvas> <Canvas>
<Story id="ui-components-app-flask-snap-settings-card-snap-settings-card-stories-js--status" /> <Story id="components-app-flask-snapsettingscard--status" />
</Canvas> </Canvas>
### isEnabled / onToggle ### isEnabled / onToggle

View File

@ -6,7 +6,7 @@ import SnapSettingsCard from '.';
export default { export default {
title: 'Components/App/Flask/SnapSettingsCard', title: 'Components/App/Flask/SnapSettingsCard',
id: __filename,
component: SnapSettingsCard, component: SnapSettingsCard,
parameters: { parameters: {
docs: { docs: {

View File

@ -10,7 +10,7 @@ const store = configureStore(testData);
export default { export default {
title: 'Components/App/SnapUIRenderer', title: 'Components/App/SnapUIRenderer',
id: __filename,
decorators: [(story) => <Provider store={store}>{story()}</Provider>], decorators: [(story) => <Provider store={store}>{story()}</Provider>],
}; };

View File

@ -3,7 +3,7 @@ import SnapsAuthorshipPill from '.';
export default { export default {
title: 'Components/App/Flask/SnapsAuthorshipPill', title: 'Components/App/Flask/SnapsAuthorshipPill',
id: __filename,
component: SnapsAuthorshipPill, component: SnapsAuthorshipPill,
argTypes: { argTypes: {
snapId: { snapId: {

View File

@ -3,7 +3,7 @@ import HoldToRevealButton from './hold-to-reveal-button';
export default { export default {
title: 'Components/App/HoldToRevealButton', title: 'Components/App/HoldToRevealButton',
id: __filename,
argTypes: { argTypes: {
buttonText: { control: 'text' }, buttonText: { control: 'text' },
onLongPressed: { action: 'Revealing the SRP' }, onLongPressed: { action: 'Revealing the SRP' },

View File

@ -4,7 +4,7 @@ import HomeNotification from './home-notification.component';
export default { export default {
title: 'Components/App/HomeNotification', title: 'Components/App/HomeNotification',
id: __filename,
component: HomeNotification, component: HomeNotification,
argTypes: { argTypes: {
acceptText: { acceptText: {

View File

@ -4,7 +4,7 @@ import InfoBox from '.';
export default { export default {
title: 'Components/App/InfoBox', title: 'Components/App/InfoBox',
id: __filename,
component: InfoBox, component: InfoBox,
argTypes: { argTypes: {
title: 'string', title: 'string',

View File

@ -3,7 +3,7 @@ import AccountOptionsMenu from '.';
export default { export default {
title: 'Components/App/AccountOptionsMenu', title: 'Components/App/AccountOptionsMenu',
id: __filename,
argTypes: { argTypes: {
anchorElement: { anchorElement: {
control: 'func', control: 'func',

View File

@ -5,7 +5,6 @@ import MetaMaskTemplateRenderer from '.';
export default { export default {
title: 'Components/App/MetamaskTemplateRenderer', title: 'Components/App/MetamaskTemplateRenderer',
id: __filename,
}; };
const SECTIONS = { const SECTIONS = {

View File

@ -20,7 +20,7 @@ the safeComponentList for what kind of components we allow these special
trees to contain. trees to contain.
<Canvas> <Canvas>
<Story id="ui-components-app-metamask-translation-metamask-translation-stories-js--default-story" /> <Story id="components-app-metamasktranslation--default-story" />
</Canvas> </Canvas>
## Props ## Props

View File

@ -13,7 +13,7 @@ const { keysWithoutSubstitution } = groupBy(Object.keys(en), (key) => {
export default { export default {
title: 'Components/App/MetamaskTranslation', title: 'Components/App/MetamaskTranslation',
id: __filename,
component: MetaMaskTranslation, component: MetaMaskTranslation,
parameters: { parameters: {
docs: { docs: {

View File

@ -3,7 +3,7 @@ import ConfirmRemoveAccount from '.';
export default { export default {
title: 'Components/App/Modals/ConfirmRemoveAccount', title: 'Components/App/Modals/ConfirmRemoveAccount',
id: __filename,
component: ConfirmRemoveAccount, component: ConfirmRemoveAccount,
argTypes: { argTypes: {
identity: { identity: {

View File

@ -3,7 +3,7 @@ import ContractDetailsModal from './contract-details-modal';
export default { export default {
title: 'Components/App/Modals/ContractDetailsModal', title: 'Components/App/Modals/ContractDetailsModal',
id: __filename,
argTypes: { argTypes: {
onClose: { onClose: {
action: 'onClose', action: 'onClose',

View File

@ -3,7 +3,6 @@ import ExportPrivateKeyModal from '.';
export default { export default {
title: 'Components/App/Modals/ExportPrivateKeyModal', title: 'Components/App/Modals/ExportPrivateKeyModal',
id: __filename,
}; };
export const DefaultStory = () => <ExportPrivateKeyModal />; export const DefaultStory = () => <ExportPrivateKeyModal />;

View File

@ -3,7 +3,6 @@ import HideTokenConfirmationModal from '.';
export default { export default {
title: 'Components/App/Modals/HideTokenConfirmationModal', title: 'Components/App/Modals/HideTokenConfirmationModal',
id: __filename,
}; };
export const DefaultStory = () => <HideTokenConfirmationModal />; export const DefaultStory = () => <HideTokenConfirmationModal />;

View File

@ -3,7 +3,6 @@ import NewAccountModal from './new-account-modal.component';
export default { export default {
title: 'Components/App/Modals/NewAccountModal', title: 'Components/App/Modals/NewAccountModal',
id: __filename,
}; };
export const DefaultStory = () => <NewAccountModal />; export const DefaultStory = () => <NewAccountModal />;

View File

@ -3,7 +3,6 @@ import TransactionConfirmed from '.';
export default { export default {
title: 'Components/App/Modals/TransactionConfirmed', title: 'Components/App/Modals/TransactionConfirmed',
id: __filename,
}; };
export const DefaultStory = () => <TransactionConfirmed />; export const DefaultStory = () => <TransactionConfirmed />;

View File

@ -3,7 +3,7 @@ import NetworkAccountBalanceHeader from './network-account-balance-header';
export default { export default {
title: 'Components/App/NetworkAccountBalanceHeader', title: 'Components/App/NetworkAccountBalanceHeader',
id: __filename,
argTypes: { argTypes: {
networkName: { networkName: {
control: { type: 'text' }, control: { type: 'text' },

View File

@ -10,7 +10,7 @@ import NetworkDisplay from '.';
export default { export default {
title: 'Components/App/NetworkDisplay', title: 'Components/App/NetworkDisplay',
id: __filename,
argTypes: { argTypes: {
indicatorSize: { indicatorSize: {
control: 'select', control: 'select',

View File

@ -4,7 +4,7 @@ import PermissionsConnectList from '.';
export default { export default {
title: 'Components/App/PermissionsConnectList', title: 'Components/App/PermissionsConnectList',
id: __filename,
component: PermissionsConnectList, component: PermissionsConnectList,
argTypes: { argTypes: {
permissions: { permissions: {

View File

@ -4,7 +4,7 @@ import SetApproveForAllWarning from '.';
export default { export default {
title: 'Components/App/SetApproveForAllWarning', title: 'Components/App/SetApproveForAllWarning',
id: __filename,
argTypes: { argTypes: {
collectionName: { collectionName: {
control: 'text', control: 'text',

View File

@ -7,7 +7,7 @@ import SignatureRequestOriginal from '.';
dApp requesting a signature from the user. This component appears for eth_signTypedData signatures are not v3 or v4. For other signatures, please see SignatureRequest. dApp requesting a signature from the user. This component appears for eth_signTypedData signatures are not v3 or v4. For other signatures, please see SignatureRequest.
<Canvas> <Canvas>
<Story id="ui-components-app-signature-request-signature-request-original-stories-js--default-story" /> <Story id="components-app-signaturerequestoriginal--default-story" />
</Canvas> </Canvas>
## Props ## Props

View File

@ -41,7 +41,7 @@ const MOCK_SIGN_DATA = JSON.stringify({
export default { export default {
title: 'Components/App/SignatureRequestOriginal', title: 'Components/App/SignatureRequestOriginal',
id: __filename,
component: SignatureRequestOriginal, component: SignatureRequestOriginal,
parameters: { parameters: {
docs: { docs: {

View File

@ -7,7 +7,7 @@ import SignatureRequestSIWE from '.';
dApp requesting the user to Sign in with Ethereum. dApp requesting the user to Sign in with Ethereum.
<Canvas> <Canvas>
<Story id="ui-components-app-signature-request-siwe-signature-request-siwe-stories-js--default-story" /> <Story id="components-app-signaturerequestsiwe--default-story" />
</Canvas> </Canvas>
## Component API ## Component API

View File

@ -11,7 +11,7 @@ const subjectMetadata = {
export default { export default {
title: 'Components/App/SignatureRequestSIWE/SignatureRequestSIWEHeader', title: 'Components/App/SignatureRequestSIWE/SignatureRequestSIWEHeader',
id: __filename,
argTypes: { argTypes: {
fromAccount: { fromAccount: {
table: { table: {

View File

@ -3,7 +3,6 @@ import SignatureRequestSIWEIcon from '.';
export default { export default {
title: 'Components/App/SignatureRequestSIWE/SignatureRequestSIWEIcon', title: 'Components/App/SignatureRequestSIWE/SignatureRequestSIWEIcon',
id: __filename,
}; };
export const DefaultStory = (args) => <SignatureRequestSIWEIcon {...args} />; export const DefaultStory = (args) => <SignatureRequestSIWEIcon {...args} />;

View File

@ -3,7 +3,7 @@ import SignatureRequestMessage from '.';
export default { export default {
title: 'Components/App/SignatureRequestSIWE/SignatureRequestMessage', title: 'Components/App/SignatureRequestSIWE/SignatureRequestMessage',
id: __filename,
argTypes: { argTypes: {
data: { data: {
controls: 'object', controls: 'object',

View File

@ -3,7 +3,7 @@ import SignatureRequestSIWETag from '.';
export default { export default {
title: 'Components/App/SignatureRequestSIWE/SignatureRequestSIWETag', title: 'Components/App/SignatureRequestSIWE/SignatureRequestSIWETag',
id: __filename,
argTypes: { argTypes: {
text: { control: 'text' }, text: { control: 'text' },
}, },

View File

@ -8,7 +8,7 @@ const otherIdentity = Object.values(identities)[0];
export default { export default {
title: 'Components/App/SignatureRequestSIWE', title: 'Components/App/SignatureRequestSIWE',
id: __filename,
component: SignatureRequestSIWE, component: SignatureRequestSIWE,
parameters: { parameters: {
docs: { docs: {

View File

@ -7,7 +7,7 @@ import SignatureRequest from '.';
dApp requesting a signature from the user. dApp requesting a signature from the user.
<Canvas> <Canvas>
<Story id="ui-components-app-signature-request-signature-request-stories-js--default-story" /> <Story id="components-app-signaturerequest--default-story" />
</Canvas> </Canvas>
## Props ## Props

View File

@ -3,7 +3,7 @@ import SignatureRequestData from './signature-request-data';
export default { export default {
title: 'Components/App/SignatureRequest/SignatureRequestData', title: 'Components/App/SignatureRequest/SignatureRequestData',
id: __filename,
component: SignatureRequestData, component: SignatureRequestData,
argTypes: { argTypes: {
data: { control: 'object' }, data: { control: 'object' },

View File

@ -3,7 +3,6 @@ import SignatureRequestHeader from '.';
export default { export default {
title: 'Components/App/SignatureRequest/SignatureRequestHeader', title: 'Components/App/SignatureRequest/SignatureRequestHeader',
id: __filename,
}; };
export const DefaultStory = () => <SignatureRequestHeader />; export const DefaultStory = () => <SignatureRequestHeader />;

View File

@ -3,7 +3,7 @@ import SignatureRequestMessage from './signature-request-message';
export default { export default {
title: 'Components/App/SignatureRequestMessage', title: 'Components/App/SignatureRequestMessage',
id: __filename,
component: SignatureRequestMessage, component: SignatureRequestMessage,
argTypes: { argTypes: {
data: { control: 'object' }, data: { control: 'object' },

View File

@ -7,7 +7,7 @@ const [MOCK_PRIMARY_IDENTITY] = Object.values(testData.metamask.identities);
export default { export default {
title: 'Components/App/SignatureRequest', title: 'Components/App/SignatureRequest',
id: __filename,
component: SignatureRequest, component: SignatureRequest,
parameters: { parameters: {
docs: { docs: {

View File

@ -3,7 +3,7 @@ import SrpInput from '.';
export default { export default {
title: 'Components/App/SrpInput', title: 'Components/App/SrpInput',
id: __filename,
component: SrpInput, component: SrpInput,
argTypes: { argTypes: {
onChange: { action: 'changed' }, onChange: { action: 'changed' },

View File

@ -3,7 +3,7 @@ import TabBar from '.';
export default { export default {
title: 'Components/App/TabBar', title: 'Components/App/TabBar',
id: __filename,
argTypes: { argTypes: {
isActive: { isActive: {
action: 'isActive', action: 'isActive',

View File

@ -4,7 +4,7 @@ import TransactionActivityLogIcon from '.';
export default { export default {
title: 'Components/App/TransactionActivityLog/TransactionActivityLogIcon', title: 'Components/App/TransactionActivityLog/TransactionActivityLogIcon',
id: __filename,
argTypes: { argTypes: {
className: { className: {
control: 'text', control: 'text',

View File

@ -7,7 +7,7 @@ import TransactionDetailItem from '.';
Transaction detail that includes estimated gas fees. Intended to be used as an array item in the array passed to the `rows` prop of `<TransactionDetail />` Transaction detail that includes estimated gas fees. Intended to be used as an array item in the array passed to the `rows` prop of `<TransactionDetail />`
<Canvas> <Canvas>
<Story id="ui-components-app-transaction-detail-item-transaction-detail-item-stories-js--default-story" /> <Story id="components-app-transactiondetailitem--default-story" />
</Canvas> </Canvas>
## Props ## Props

View File

@ -8,7 +8,7 @@ import TransactionDetailItem from '.';
export default { export default {
title: 'Components/App/TransactionDetailItem', title: 'Components/App/TransactionDetailItem',
id: __filename,
component: TransactionDetailItem, component: TransactionDetailItem,
parameters: { parameters: {
docs: { docs: {

View File

@ -7,7 +7,7 @@ import TransactionDetail from '.';
Show transaction detail including estimated gas fee and total fee. Show transaction detail including estimated gas fee and total fee.
<Canvas> <Canvas>
<Story id="ui-components-app-transaction-detail-transaction-detail-stories-js--default-story" /> <Story id="components-app-transactiondetail--default-story" />
</Canvas> </Canvas>
## Props ## Props

View File

@ -7,7 +7,7 @@ import TransactionDetail from '.';
export default { export default {
title: 'Components/App/TransactionDetail', title: 'Components/App/TransactionDetail',
id: __filename,
component: TransactionDetail, component: TransactionDetail,
parameters: { parameters: {
docs: { docs: {

View File

@ -41,7 +41,7 @@ const getMockTransactionGroup = (args) => {
*/ */
export default { export default {
title: 'Components/App/TransactionListItem', title: 'Components/App/TransactionListItem',
id: __filename,
argTypes: { argTypes: {
isEarliestNonce: { control: 'boolean' }, isEarliestNonce: { control: 'boolean' },
'transactionGroup.hasCancelled': { control: 'boolean' }, 'transactionGroup.hasCancelled': { control: 'boolean' },

View File

@ -4,7 +4,6 @@ import TransactionList from '.';
export default { export default {
title: 'Components/App/TransactionList', title: 'Components/App/TransactionList',
id: __filename,
}; };
const PageSet = ({ children }) => { const PageSet = ({ children }) => {

View File

@ -5,7 +5,7 @@ import UserPreferencedCurrencyDisplay from '.';
export default { export default {
title: 'Components/App/UserPreferencedCurrencyDisplay', title: 'Components/App/UserPreferencedCurrencyDisplay',
id: __filename,
argTypes: { argTypes: {
className: { className: {
control: 'text', control: 'text',

View File

@ -8,16 +8,16 @@ import { AvatarBase } from '../';
The `AvatarAccount` is a type of avatar reserved for representing accounts. The `AvatarAccount` is a type of avatar reserved for representing accounts.
<Canvas> <Canvas>
<Story id="ui-components-component-library-avatar-account-avatar-account-stories-js--default-story" /> <Story id="components-componentlibrary-avataraccount--default-story" />
</Canvas> </Canvas>
## Props ## Props
The `AvatarAccount` accepts all props below as well as all [Box](/docs/ui-components-ui-box-box-stories-js--default-story) component props The `AvatarAccount` accepts all props below as well as all [Box](/docs/components-ui-box--default-story#props) component props
<ArgsTable of={AvatarAccount} /> <ArgsTable of={AvatarAccount} />
`AvatarAccount` accepts all [AvatarBase](/docs/ui-components-component-library-avatar-base-avatar-base-stories-js--default-story#props) `AvatarAccount` accepts all [AvatarBase](/docs/components-componentlibrary-avatarbase--default-story))
component props component props
<ArgsTable of={AvatarBase} /> <ArgsTable of={AvatarBase} />
@ -39,7 +39,7 @@ Possible sizes include:
Defaults to `SIZES.MD` Defaults to `SIZES.MD`
<Canvas> <Canvas>
<Story id="ui-components-component-library-avatar-account-avatar-account-stories-js--size" /> <Story id="components-componentlibrary-avataraccount--size" />
</Canvas> </Canvas>
```jsx ```jsx
@ -58,7 +58,7 @@ import { AvatarAccount } from '../ui/component-library';
Use the `type` prop for the avatar to be rendered, it can either be a Jazzicon or a Blockie Use the `type` prop for the avatar to be rendered, it can either be a Jazzicon or a Blockie
<Canvas> <Canvas>
<Story id="ui-components-component-library-avatar-account-avatar-account-stories-js--type" /> <Story id="components-componentlibrary-avataraccount--type" />
</Canvas> </Canvas>
```jsx ```jsx
@ -74,7 +74,7 @@ import { AvatarAccount } from '../ui/component-library';
Use the required `address` for generating images Use the required `address` for generating images
<Canvas> <Canvas>
<Story id="ui-components-component-library-avatar-account-avatar-account-stories-js--address" /> <Story id="components-componentlibrary-avataraccount--address" />
</Canvas> </Canvas>
```jsx ```jsx

View File

@ -15,7 +15,7 @@ import README from './README.mdx';
export default { export default {
title: 'Components/ComponentLibrary/AvatarAccount', title: 'Components/ComponentLibrary/AvatarAccount',
id: __filename,
component: AvatarAccount, component: AvatarAccount,
parameters: { parameters: {
docs: { docs: {

View File

@ -9,12 +9,12 @@ import { AvatarBase } from './avatar-base';
The `AvatarBase` is a wrapper component responsible for enforcing dimensions and border radius for Avatar components The `AvatarBase` is a wrapper component responsible for enforcing dimensions and border radius for Avatar components
<Canvas> <Canvas>
<Story id="ui-components-component-library-avatar-base-avatar-base-stories-js--default-story" /> <Story id="components-componentlibrary-avatarbase--default-story" />
</Canvas> </Canvas>
## Props ## Props
The `AvatarBase` accepts all props below as well as all [Box](/docs/ui-components-ui-box-box-stories-js--default-story#props) component props. The `AvatarBase` accepts all props below as well as all [Box](/docs/components-ui-box--default-story#props) component props.
<ArgsTable of={AvatarBase} /> <ArgsTable of={AvatarBase} />
@ -33,7 +33,7 @@ Possible sizes include:
Defaults to `md` Defaults to `md`
<Canvas> <Canvas>
<Story id="ui-components-component-library-avatar-base-avatar-base-stories-js--size" /> <Story id="components-componentlibrary-avatarbase--size" />
</Canvas> </Canvas>
```jsx ```jsx
@ -51,7 +51,7 @@ import { AvatarBase } from '../../component-library';
The `AvatarBase` component can contain images, icons or text The `AvatarBase` component can contain images, icons or text
<Canvas> <Canvas>
<Story id="ui-components-component-library-avatar-base-avatar-base-stories-js--children" /> <Story id="components-componentlibrary-avatarbase--children" />
</Canvas> </Canvas>
```jsx ```jsx
@ -73,7 +73,7 @@ import { AvatarBase } from '../../component-library';
Use the `color`, `backgroundColor` and `borderColor` props to set the text color, background-color and border-color of the `AvatarBase`. Use the `color`, `backgroundColor` and `borderColor` props to set the text color, background-color and border-color of the `AvatarBase`.
<Canvas> <Canvas>
<Story id="ui-components-component-library-avatar-base-avatar-base-stories-js--color-background-color-and-border-color" /> <Story id="components-componentlibrary-avatarbase--color-background-color-and-border-color" />
</Canvas> </Canvas>
```jsx ```jsx

View File

@ -33,7 +33,7 @@ const marginSizeKnobOptions = [
export default { export default {
title: 'Components/ComponentLibrary/AvatarBase', title: 'Components/ComponentLibrary/AvatarBase',
id: __filename,
component: AvatarBase, component: AvatarBase,
parameters: { parameters: {
docs: { docs: {

View File

@ -9,16 +9,16 @@ import { AvatarFavicon } from './avatar-favicon';
The `AvatarFavicon` is an image component that renders an icon that is provided in the form of a URL. The `AvatarFavicon` is an image component that renders an icon that is provided in the form of a URL.
<Canvas> <Canvas>
<Story id="ui-components-component-library-avatar-favicon-avatar-favicon-stories-js--default-story" /> <Story id="components-componentlibrary-avatarfavicon--default-story" />
</Canvas> </Canvas>
## Props ## Props
The `AvatarFavicon` accepts all props below as well as all [Box](/docs/ui-components-ui-box-box-stories-js--default-story) component props The `AvatarFavicon` accepts all props below as well as all [Box](/docs/components-ui-box--default-story#props) component props
<ArgsTable of={AvatarFavicon} /> <ArgsTable of={AvatarFavicon} />
`AvatarFavicon` accepts all [AvatarBase](/docs/ui-components-component-library-avatar-base-avatar-base-stories-js--default-story#props) `AvatarFavicon` accepts all [AvatarBase](components-componentlibrary-avatarbase--default-story))
component props component props
<ArgsTable of={AvatarBase} /> <ArgsTable of={AvatarBase} />
@ -40,7 +40,7 @@ Possible sizes include:
Defaults to `SIZES.MD` Defaults to `SIZES.MD`
<Canvas> <Canvas>
<Story id="ui-components-component-library-avatar-favicon-avatar-favicon-stories-js--size" /> <Story id="components-componentlibrary-avatarfavicon--size" />
</Canvas> </Canvas>
```jsx ```jsx
@ -59,7 +59,7 @@ import { AvatarFavicon } from '../ui/component-library';
Use the `src` prop to set the image to be rendered of the `AvatarFavicon`. Use the `src` prop to set the image to be rendered of the `AvatarFavicon`.
<Canvas> <Canvas>
<Story id="ui-components-component-library-avatar-favicon-avatar-favicon-stories-js--src" /> <Story id="components-componentlibrary-avatarfavicon--src" />
</Canvas> </Canvas>
```jsx ```jsx
@ -71,5 +71,5 @@ import { AvatarFavicon } from '../ui/component-library';
### Fallback Icon Props ### Fallback Icon Props
If there is no `src` then in that case an [icon](/docs/ui-components-component-library-icon-icon-stories-js--default-story) will be used as the fallback display and it can be customised via `fallbackIconProps`. If there is no `src` then in that case an [icon](/docs/components-componentlibrary-icon--default-story) will be used as the fallback display and it can be customised via `fallbackIconProps`.

View File

@ -13,7 +13,7 @@ import { AvatarFavicon, AVATAR_FAVICON_SIZES } from '.';
export default { export default {
title: 'Components/ComponentLibrary/AvatarFavicon', title: 'Components/ComponentLibrary/AvatarFavicon',
id: __filename,
component: AvatarFavicon, component: AvatarFavicon,
parameters: { parameters: {
docs: { docs: {

View File

@ -5,19 +5,19 @@ import { AvatarIcon } from './avatar-icon';
# AvatarIcon # AvatarIcon
The `AvatarIcon` is an avatar component that renders only an icon inside and is built off the [AvatarBase](/docs/ui-components-component-library-avatar-base-avatar-base-stories-js--default-story#props) component The `AvatarIcon` is an avatar component that renders only an icon inside and is built off the [AvatarBase](/docs/components-componentlibrary-avatarbase--default-story)) component
<Canvas> <Canvas>
<Story id="ui-components-component-library-avatar-icon-avatar-icon-stories-js--default-story" /> <Story id="components-componentlibrary-avataricon--default-story" />
</Canvas> </Canvas>
## Props ## Props
The `AvatarIcon` accepts all props below as well as all [Box](/docs/ui-components-ui-box-box-stories-js--default-story) component props The `AvatarIcon` accepts all props below as well as all [Box](/docs/components-ui-box--default-story#props) component props
<ArgsTable of={AvatarIcon} /> <ArgsTable of={AvatarIcon} />
`AvatarIcon` accepts all [AvatarBase](/docs/ui-components-component-library-avatar-base-avatar-base-stories-js--default-story#props) `AvatarIcon` accepts all [AvatarBase](/docs/components-componentlibrary-avatarbase--default-story))
component props component props
<ArgsTable of={AvatarBase} /> <ArgsTable of={AvatarBase} />
@ -39,7 +39,7 @@ Possible sizes include:
Defaults to `SIZES.MD` Defaults to `SIZES.MD`
<Canvas> <Canvas>
<Story id="ui-components-component-library-avatar-icon-avatar-icon-stories-js--size" /> <Story id="components-componentlibrary-avataricon--size" />
</Canvas> </Canvas>
```jsx ```jsx
@ -57,10 +57,10 @@ import { AvatarIcon, ICON_NAMES } from '../ui/component-library';
Use the required `iconName` prop with `ICON_NAMES` object from `./ui/components/component-library` to select icon Use the required `iconName` prop with `ICON_NAMES` object from `./ui/components/component-library` to select icon
Use the [IconSearch](/story/ui-components-component-library-icon-icon-stories-js--default-story) story to find the icon you want to use. Use the [IconSearch](/story/components-componentlibrary-icon--default-story) story to find the icon you want to use.
<Canvas> <Canvas>
<Story id="ui-components-component-library-avatar-icon-avatar-icon-stories-js--icon-name" /> <Story id="components-componentlibrary-avataricon--icon-name" />
</Canvas> </Canvas>
```jsx ```jsx
@ -81,7 +81,7 @@ Use the `color` and `backgroundColor` props with the `COLORS` object from `./ui/
`backgroundColor` default: `COLORS.COLORS.PRIMARY_MUTED` `backgroundColor` default: `COLORS.COLORS.PRIMARY_MUTED`
<Canvas> <Canvas>
<Story id="ui-components-component-library-avatar-icon-avatar-icon-stories-js--color-and-background-color" /> <Story id="components-componentlibrary-avataricon--color-and-background-color" />
</Canvas> </Canvas>
```jsx ```jsx

View File

@ -34,7 +34,7 @@ const marginSizeControlOptions = [
export default { export default {
title: 'Components/ComponentLibrary/AvatarIcon', title: 'Components/ComponentLibrary/AvatarIcon',
id: __filename,
component: AvatarIcon, component: AvatarIcon,
parameters: { parameters: {
docs: { docs: {

View File

@ -7,12 +7,12 @@ import { AvatarNetwork } from './avatar-network';
The `AvatarNetwork` is a component responsible for display of the image of a given network The `AvatarNetwork` is a component responsible for display of the image of a given network
<Canvas> <Canvas>
<Story id="ui-components-component-library-avatar-network-avatar-network-stories-js--default-story" /> <Story id="components-componentlibrary-avatarnetwork--default-story" />
</Canvas> </Canvas>
## Props ## Props
The `AvatarNetwork` accepts all props below as well as all [Box](/docs/ui-components-ui-box-box-stories-js--default-story) component props The `AvatarNetwork` accepts all props below as well as all [Box](/docs/components-ui-box--default-story#props) component props
<ArgsTable of={AvatarNetwork} /> <ArgsTable of={AvatarNetwork} />
@ -31,7 +31,7 @@ Possible sizes include:
Defaults to `md` Defaults to `md`
<Canvas> <Canvas>
<Story id="ui-components-component-library-avatar-network-avatar-network-stories-js--size" /> <Story id="components-componentlibrary-avatarnetwork--size" />
</Canvas> </Canvas>
```jsx ```jsx
@ -49,7 +49,7 @@ import { AvatarNetwork } from '../../component-library';
Use the `name` prop to set the initial letter of the `AvatarNetwork`. This will be used as the fallback display if no image url is passed to the `src` prop. Use the `name` prop to set the initial letter of the `AvatarNetwork`. This will be used as the fallback display if no image url is passed to the `src` prop.
<Canvas> <Canvas>
<Story id="ui-components-component-library-avatar-network-avatar-network-stories-js--name" /> <Story id="components-componentlibrary-avatarnetwork--name" />
</Canvas> </Canvas>
```jsx ```jsx
@ -62,7 +62,7 @@ import { AvatarNetwork } from '../../component-library';
Use the `src` prop to set the image to be rendered of the `AvatarNetwork`. Use the `src` prop to set the image to be rendered of the `AvatarNetwork`.
<Canvas> <Canvas>
<Story id="ui-components-component-library-avatar-network-avatar-network-stories-js--src" /> <Story id="components-componentlibrary-avatarnetwork--src" />
</Canvas> </Canvas>
```jsx ```jsx
@ -83,7 +83,7 @@ import { AvatarNetwork } from '../../component-library';
Use the `showHalo` prop to display the component with halo effect. Only works if an image url is supplied to `src` Use the `showHalo` prop to display the component with halo effect. Only works if an image url is supplied to `src`
<Canvas> <Canvas>
<Story id="ui-components-component-library-avatar-network-avatar-network-stories-js--show-halo" /> <Story id="components-componentlibrary-avatarnetwork--show-halo" />
</Canvas> </Canvas>
```jsx ```jsx
@ -96,7 +96,7 @@ import { AvatarNetwork } from '../../component-library';
Use the `color`, `backgroundColor` and `borderColor` props to set the text color, background-color and border-color of the `AvatarNetwork`. Use the `color`, `backgroundColor` and `borderColor` props to set the text color, background-color and border-color of the `AvatarNetwork`.
<Canvas> <Canvas>
<Story id="ui-components-component-library-avatar-network-avatar-network-stories-js--color-background-color-and-border-color" /> <Story id="components-componentlibrary-avatarnetwork--color-background-color-and-border-color" />
</Canvas> </Canvas>
```jsx ```jsx

View File

@ -17,7 +17,7 @@ import { AVATAR_NETWORK_SIZES } from './avatar-network.constants';
export default { export default {
title: 'Components/ComponentLibrary/AvatarNetwork', title: 'Components/ComponentLibrary/AvatarNetwork',
id: __filename,
component: AvatarNetwork, component: AvatarNetwork,
parameters: { parameters: {
docs: { docs: {

View File

@ -7,12 +7,12 @@ import { AvatarToken } from './avatar-token';
The `AvatarToken` is a component responsible for display of the image of a given token The `AvatarToken` is a component responsible for display of the image of a given token
<Canvas> <Canvas>
<Story id="ui-components-component-library-avatar-token-avatar-token-stories-js--default-story" /> <Story id="components-componentlibrary-avatartoken--default-story" />
</Canvas> </Canvas>
## Props ## Props
The `AvatarToken` accepts all props below as well as all [Box](/docs/ui-components-ui-box-box-stories-js--default-story#props) component props The `AvatarToken` accepts all props below as well as all [Box](/docs/components-ui-box--default-story#props) component props
<ArgsTable of={AvatarToken} /> <ArgsTable of={AvatarToken} />
@ -31,7 +31,7 @@ Possible sizes include:
Defaults to `md` Defaults to `md`
<Canvas> <Canvas>
<Story id="ui-components-component-library-avatar-token-avatar-token-stories-js--size" /> <Story id="components-componentlibrary-avatartoken--size" />
</Canvas> </Canvas>
```jsx ```jsx
@ -49,7 +49,7 @@ import { AvatarToken } from '../../component-library';
Use the `name` prop to set the initial letter of the `AvatarToken`. This will be used as the fallback display if no image url is passed to the `src` prop. Use the `name` prop to set the initial letter of the `AvatarToken`. This will be used as the fallback display if no image url is passed to the `src` prop.
<Canvas> <Canvas>
<Story id="ui-components-component-library-avatar-token-avatar-token-stories-js--name" /> <Story id="components-componentlibrary-avatartoken--name" />
</Canvas> </Canvas>
```jsx ```jsx
@ -62,7 +62,7 @@ import { AvatarToken } from '../../component-library';
Use the `src` prop to set the image to be rendered of the `AvatarToken`. Use the `src` prop to set the image to be rendered of the `AvatarToken`.
<Canvas> <Canvas>
<Story id="ui-components-component-library-avatar-token-avatar-token-stories-js--src" /> <Story id="components-componentlibrary-avatartoken--src" />
</Canvas> </Canvas>
```jsx ```jsx
@ -82,7 +82,7 @@ import { AvatarToken } from '../../component-library';
Use the `showHalo` prop to display the component with halo effect. Only works if an image url is supplied to `src` Use the `showHalo` prop to display the component with halo effect. Only works if an image url is supplied to `src`
<Canvas> <Canvas>
<Story id="ui-components-component-library-avatar-token-avatar-token-stories-js--show-halo" /> <Story id="components-componentlibrary-avatartoken--show-halo" />
</Canvas> </Canvas>
```jsx ```jsx
@ -97,7 +97,7 @@ import { AvatarToken } from '../../component-library';
Use the `color`, `backgroundColor` and `borderColor` props to set the text color, background-color and border-color of the `AvatarToken`. Use the `color`, `backgroundColor` and `borderColor` props to set the text color, background-color and border-color of the `AvatarToken`.
<Canvas> <Canvas>
<Story id="ui-components-component-library-avatar-token-avatar-token-stories-js--color-background-color-and-border-color" /> <Story id="components-componentlibrary-avatartoken--color-background-color-and-border-color" />
</Canvas> </Canvas>
```jsx ```jsx

View File

@ -17,7 +17,7 @@ import { AVATAR_TOKEN_SIZES } from './avatar-token.constants';
export default { export default {
title: 'Components/ComponentLibrary/AvatarToken', title: 'Components/ComponentLibrary/AvatarToken',
id: __filename,
component: AvatarToken, component: AvatarToken,
parameters: { parameters: {
docs: { docs: {

View File

@ -7,12 +7,12 @@ import { AvatarWithBadge } from './avatar-with-badge';
The `AvatarWithBadge` is a wrapper component that adds badge display options to avatars. The `AvatarWithBadge` is a wrapper component that adds badge display options to avatars.
<Canvas> <Canvas>
<Story id="ui-components-component-library-avatar-with-badge-avatar-with-badge-stories-js--default-story" /> <Story id="components-componentlibrary-avatarwithbadge--default-story" />
</Canvas> </Canvas>
## Props ## Props
The `AvatarWithBadge` accepts all props below as well as all [Box](/docs/ui-components-ui-box-box-stories-js--default-story) component props. The `AvatarWithBadge` accepts all props below as well as all [Box](/docs/components-ui-box--default-story#props) component props.
<ArgsTable of={AvatarWithBadge} /> <ArgsTable of={AvatarWithBadge} />
@ -21,7 +21,7 @@ The `AvatarWithBadge` accepts all props below as well as all [Box](/docs/ui-comp
Use the `badgePosition` prop to set the position of the badge, it can have two values `Top` and `Bottom` Use the `badgePosition` prop to set the position of the badge, it can have two values `Top` and `Bottom`
<Canvas> <Canvas>
<Story id="ui-components-component-library-avatar-with-badge-avatar-with-badge-stories-js--badge-position" /> <Story id="components-componentlibrary-avatarwithbadge--badge-position" />
</Canvas> </Canvas>
```jsx ```jsx

View File

@ -14,7 +14,7 @@ import { AvatarWithBadge } from './avatar-with-badge';
export default { export default {
title: 'Components/ComponentLibrary/AvatarWithBadge', title: 'Components/ComponentLibrary/AvatarWithBadge',
id: __filename,
component: AvatarWithBadge, component: AvatarWithBadge,
parameters: { parameters: {
docs: { docs: {

View File

@ -8,12 +8,12 @@ import { BannerBase } from './banner-base';
The `BannerBase` is the base component for banners The `BannerBase` is the base component for banners
<Canvas style={{ background: 'var(--color-background-alternative)' }}> <Canvas style={{ background: 'var(--color-background-alternative)' }}>
<Story id="ui-components-component-library-banner-base-banner-base-stories-js--default-story" /> <Story id="components-componentlibrary-bannerbase--default-story" />
</Canvas> </Canvas>
## Props ## Props
The `BannerBase` accepts all props below as well as all [Box](/docs/ui-components-ui-box-box-stories-js--default-story#props) component props The `BannerBase` accepts all props below as well as all [Box](/docs/components-ui-box--default-story#props) component props
<ArgsTable of={BannerBase} /> <ArgsTable of={BannerBase} />
@ -22,7 +22,7 @@ The `BannerBase` accepts all props below as well as all [Box](/docs/ui-component
Use the `title` prop to pass a string that is sentence case no period. Use the `titleProps` prop to pass additional props to the `Text` component. Use the `title` prop to pass a string that is sentence case no period. Use the `titleProps` prop to pass additional props to the `Text` component.
<Canvas style={{ background: 'var(--color-background-alternative)' }}> <Canvas style={{ background: 'var(--color-background-alternative)' }}>
<Story id="ui-components-component-library-banner-base-banner-base-stories-js--title" /> <Story id="components-componentlibrary-bannerbase--title" />
</Canvas> </Canvas>
```jsx ```jsx
@ -38,7 +38,7 @@ import { BannerBase } from '../../component-library';
The `children` is the description area of the `BannerBase` that can be a text or react node. Description shouldn't repeat title and only 1-3 lines. The `children` is the description area of the `BannerBase` that can be a text or react node. Description shouldn't repeat title and only 1-3 lines.
<Canvas style={{ background: 'var(--color-background-alternative)' }}> <Canvas style={{ background: 'var(--color-background-alternative)' }}>
<Story id="ui-components-component-library-banner-base-banner-base-stories-js--children" /> <Story id="components-componentlibrary-bannerbase--children" />
</Canvas> </Canvas>
```jsx ```jsx
@ -55,10 +55,10 @@ import { BannerBase } from '../../component-library';
### Action Button Label, onClick, & Props ### Action Button Label, onClick, & Props
Use the `actionButtonLabel` prop to pass text, `actionButtonOnClick` prop to pass an onClick handler, and `actionButtonProps` prop to pass an object of [ButtonLink props](/docs/ui-components-component-library-button-link-button-link-stories-js--default-story) for the action Use the `actionButtonLabel` prop to pass text, `actionButtonOnClick` prop to pass an onClick handler, and `actionButtonProps` prop to pass an object of [ButtonLink props](/docs/components-componentlibrary-buttonlink--default-story) for the action
<Canvas style={{ background: 'var(--color-background-alternative)' }}> <Canvas style={{ background: 'var(--color-background-alternative)' }}>
<Story id="ui-components-component-library-banner-base-banner-base-stories-js--action-button" /> <Story id="components-componentlibrary-bannerbase--action-button" />
</Canvas> </Canvas>
```jsx ```jsx
@ -86,7 +86,7 @@ Use the `onClose` prop to pass a function to the close button. The close button
Additional props can be passed to the close button with `closeButtonProps` Additional props can be passed to the close button with `closeButtonProps`
<Canvas style={{ background: 'var(--color-background-alternative)' }}> <Canvas style={{ background: 'var(--color-background-alternative)' }}>
<Story id="ui-components-component-library-banner-base-banner-base-stories-js--on-close" /> <Story id="components-componentlibrary-bannerbase--on-close" />
</Canvas> </Canvas>
```jsx ```jsx
@ -105,7 +105,7 @@ import { BannerBase } from '../../component-library';
Use the `startAccessory` prop to add components such as icons or fox image to the start (default: left) of the `BannerBase` content Use the `startAccessory` prop to add components such as icons or fox image to the start (default: left) of the `BannerBase` content
<Canvas style={{ background: 'var(--color-background-alternative)' }}> <Canvas style={{ background: 'var(--color-background-alternative)' }}>
<Story id="ui-components-component-library-banner-base-banner-base-stories-js--start-accessory" /> <Story id="components-componentlibrary-bannerbase--start-accessory" />
</Canvas> </Canvas>
```jsx ```jsx

View File

@ -25,7 +25,6 @@ const marginSizeControlOptions = [
export default { export default {
title: 'Components/ComponentLibrary/BannerBase', title: 'Components/ComponentLibrary/BannerBase',
id: __filename,
component: BannerBase, component: BannerBase,
parameters: { parameters: {
docs: { docs: {

View File

@ -8,12 +8,12 @@ import { ButtonBase } from './button-base';
The `ButtonBase` is the base component for buttons. The `ButtonBase` is the base component for buttons.
<Canvas> <Canvas>
<Story id="ui-components-component-library-button-base-button-base-stories-js--default-story" /> <Story id="components-componentlibrary-buttonbase--default-story" />
</Canvas> </Canvas>
## Props ## Props
The `ButtonBase` accepts all props below as well as all [Box](/docs/ui-components-ui-box-box-stories-js--default-story#props) component props The `ButtonBase` accepts all props below as well as all [Box](/docs/components-ui-box--default-story#props) component props
<ArgsTable of={ButtonBase} /> <ArgsTable of={ButtonBase} />
@ -32,7 +32,7 @@ Possible sizes include:
- `SIZES.LG` 48px - `SIZES.LG` 48px
<Canvas> <Canvas>
<Story id="ui-components-component-library-button-base-button-base-stories-js--size" /> <Story id="components-componentlibrary-buttonbase--size" />
</Canvas> </Canvas>
```jsx ```jsx
@ -50,7 +50,7 @@ import { ButtonBase } from '../../ui/components/component-library';
Use boolean `block` prop to quickly enable a full width block button Use boolean `block` prop to quickly enable a full width block button
<Canvas> <Canvas>
<Story id="ui-components-component-library-button-base-button-base-stories-js--block" /> <Story id="components-componentlibrary-buttonbase--block" />
</Canvas> </Canvas>
```jsx ```jsx
@ -73,7 +73,7 @@ Button `as` options:
- `a` - `a`
<Canvas> <Canvas>
<Story id="ui-components-component-library-button-base-button-base-stories-js--as" /> <Story id="components-componentlibrary-buttonbase--as" />
</Canvas> </Canvas>
```jsx ```jsx
@ -91,7 +91,7 @@ import { ButtonBase } from '../../ui/components/component-library';
When an `href` prop is passed it will change the element to an anchor(`a`) tag. When an `href` prop is passed it will change the element to an anchor(`a`) tag.
<Canvas> <Canvas>
<Story id="ui-components-component-library-button-base-button-base-stories-js--href" /> <Story id="components-componentlibrary-buttonbase--href" />
</Canvas> </Canvas>
```jsx ```jsx
@ -105,7 +105,7 @@ import { ButtonBase } from '../../ui/components/component-library';
Use the boolean `disabled` prop to disable button Use the boolean `disabled` prop to disable button
<Canvas> <Canvas>
<Story id="ui-components-component-library-button-base-button-base-stories-js--disabled" /> <Story id="components-componentlibrary-buttonbase--disabled" />
</Canvas> </Canvas>
```jsx ```jsx
@ -119,7 +119,7 @@ import { ButtonBase } from '../../ui/components/component-library';
Use the boolean `loading` prop to set loading spinner Use the boolean `loading` prop to set loading spinner
<Canvas> <Canvas>
<Story id="ui-components-component-library-button-base-button-base-stories-js--loading" /> <Story id="components-componentlibrary-buttonbase--loading" />
</Canvas> </Canvas>
```jsx ```jsx
@ -133,7 +133,7 @@ import { ButtonBase } from '../../ui/components/component-library';
Use the `iconName` prop and the `ICON_NAMES` object from `./ui/components/component-library` to select icon. Use the `iconName` prop and the `ICON_NAMES` object from `./ui/components/component-library` to select icon.
<Canvas> <Canvas>
<Story id="ui-components-component-library-button-base-button-base-stories-js--iconName" /> <Story id="components-componentlibrary-buttonbase--icon" />
</Canvas> </Canvas>
```jsx ```jsx

View File

@ -33,7 +33,7 @@ const marginSizeControlOptions = [
export default { export default {
title: 'Components/ComponentLibrary/ButtonBase', title: 'Components/ComponentLibrary/ButtonBase',
id: __filename,
component: ButtonBase, component: ButtonBase,
parameters: { parameters: {
docs: { docs: {

View File

@ -6,12 +6,12 @@ import { ButtonIcon } from './button-icon';
The `ButtonIcon` is used for icons associated with a user action. The `ButtonIcon` is used for icons associated with a user action.
<Canvas> <Canvas>
<Story id="ui-components-component-library-button-icon-button-icon-stories-js--default-story" /> <Story id="components-componentlibrary-buttonicon--default-story" />
</Canvas> </Canvas>
## Props ## Props
The `ButtonIcon` accepts all props below as well as all [Box](/docs/ui-components-ui-box-box-stories-js--default-story#props) component props The `ButtonIcon` accepts all props below as well as all [Box](/docs/components-ui-box--default-story#props) component props
<ArgsTable of={ButtonIcon} /> <ArgsTable of={ButtonIcon} />
@ -19,10 +19,10 @@ The `ButtonIcon` accepts all props below as well as all [Box](/docs/ui-component
Use the required `iconName` prop with `ICON_NAMES` object from `./ui/components/component-library/icon` to select icon. Use the required `iconName` prop with `ICON_NAMES` object from `./ui/components/component-library/icon` to select icon.
Use the [IconSearch](/story/ui-components-component-library-icon-icon-stories-js--default-story) story to find the icon you want to use. Use the [IconSearch](/story/components-componentlibrary-icon--default-story) story to find the icon you want to use.
<Canvas> <Canvas>
<Story id="ui-components-component-library-button-icon-button-icon-stories-js--icon-name" /> <Story id="components-componentlibrary-buttonicon--icon-name" />
</Canvas> </Canvas>
```jsx ```jsx
@ -45,7 +45,7 @@ Possible sizes include:
- `SIZES.LG` 32px - `SIZES.LG` 32px
<Canvas> <Canvas>
<Story id="ui-components-component-library-button-icon-button-icon-stories-js--size" /> <Story id="components-componentlibrary-buttonicon--size" />
</Canvas> </Canvas>
```jsx ```jsx
@ -61,7 +61,7 @@ import { ButtonIcon } from '../ui/component-library';
Use the `ariaLabel` prop to set the name of the ButtonIcon for proper accessibility Use the `ariaLabel` prop to set the name of the ButtonIcon for proper accessibility
<Canvas> <Canvas>
<Story id="ui-components-component-library-button-icon-button-icon-stories-js--aria-label" /> <Story id="components-componentlibrary-buttonicon--aria-label" />
</Canvas> </Canvas>
```jsx ```jsx
@ -82,7 +82,7 @@ Button `as` options:
- `a` - `a`
<Canvas> <Canvas>
<Story id="ui-components-component-library-button-icon-button-icon-stories-js--as" /> <Story id="components-componentlibrary-buttonicon--as" />
</Canvas> </Canvas>
```jsx ```jsx
@ -98,7 +98,7 @@ import { ButtonIcon } from '../ui/component-library';
When an `href` prop is passed it will change the element to an anchor(`a`) tag. When an `href` prop is passed it will change the element to an anchor(`a`) tag.
<Canvas> <Canvas>
<Story id="ui-components-component-library-button-icon-button-icon-stories-js--href" /> <Story id="components-componentlibrary-buttonicon--href" />
</Canvas> </Canvas>
```jsx ```jsx
@ -118,7 +118,7 @@ import { ButtonIcon } from '../ui/component-library';
Use the `color` prop and the `COLORS` object to change the color of the `ButtonIcon`. Defaults to `COLORS.ICON_DEFAULT`. Use the `color` prop and the `COLORS` object to change the color of the `ButtonIcon`. Defaults to `COLORS.ICON_DEFAULT`.
<Canvas> <Canvas>
<Story id="ui-components-component-library-button-icon-button-icon-stories-js--color" /> <Story id="components-componentlibrary-buttonicon--color" />
</Canvas> </Canvas>
```jsx ```jsx
@ -136,7 +136,7 @@ import { ButtonIcon } from '../ui/component-library';
Use the boolean `disabled` prop to disable button Use the boolean `disabled` prop to disable button
<Canvas> <Canvas>
<Story id="ui-components-component-library-button-icon-button-icon-stories-js--disabled" /> <Story id="components-componentlibrary-buttonicon--disabled" />
</Canvas> </Canvas>
```jsx ```jsx

View File

@ -32,7 +32,7 @@ const marginSizeControlOptions = [
export default { export default {
title: 'Components/ComponentLibrary/ButtonIcon', title: 'Components/ComponentLibrary/ButtonIcon',
id: __filename,
component: ButtonIcon, component: ButtonIcon,
parameters: { parameters: {
docs: { docs: {

Some files were not shown because too many files have changed in this diff Show More