• Robert Knight's avatar
    Separate out icon definitions from `SvgIcon` component · 67a51874
    Robert Knight authored
    Replace the hardcoded set of available icons in `svg-icon.js` with a
    `registerIcons` function which is called by the application at startup
    to register the icons that should be available for use.
    
    This will enable us to re-use the `SvgIcon` component in the "annotator"
    part of the client or other applications (as part of our UI component
    library) which use a different set of icons.
    
    The lms application currently has a different solution for this in its
    `SvgIcon` implementation which requires the icon markup to be passed
    each time the component is used. On reflection, I think that passing
    just the name at the point of use is going to be more convenient in app
    code and when writing tests.  It also avoids the need to validate the
    markup is from a trusted source on each use.
    67a51874
Name
Last commit
Last update
.github Loading commit data...
bin Loading commit data...
docs Loading commit data...
embedding-examples Loading commit data...
images Loading commit data...
scripts Loading commit data...
src Loading commit data...
.babelrc Loading commit data...
.dockerignore Loading commit data...
.eslintignore Loading commit data...
.eslintrc Loading commit data...
.gitignore Loading commit data...
.npmignore Loading commit data...
.npmrc Loading commit data...
.prettierignore Loading commit data...
.prettierrc Loading commit data...
.python-version Loading commit data...
.travis.yml Loading commit data...
CODE_OF_CONDUCT Loading commit data...
Dockerfile Loading commit data...
Jenkinsfile Loading commit data...
LICENSE Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
gulpfile.js Loading commit data...
package.json Loading commit data...
requirements-dev.in Loading commit data...
tox.ini Loading commit data...
yarn.lock Loading commit data...