Wondering what’s next for npm?Check out our public roadmap! »

    @manuscripts/assets
    TypeScript icon, indicating that this package has built-in type declarations

    0.6.1 • Public • Published

    Manuscripts graphical assets

    This repository contains graphical asset originals (Symbols.sketch), as well as exports in various formats bitmap and vector formats.

    Publishing

    1. npm run build to export the images from the Sketch file, generate the placeholder JS via webpack, and generate the React components via svgr (or npm run build-react if the images have already been exported).
    2. Increment the version in package.json.
    3. npm publish to publish the package to the private repository.

    Resizing the React components

    The width and height props are passed through to the SVG component (as are any other props), so set these to resize a component.

    Styling the React components

    There are no class attributes in the SVG files, but there are other CSS selectors that can be used to apply styles. For example:

    const StyledIcon = styled(Icon)`
      /* SVG element selector */
      circle {
        stroke: currentColor;
      }
      
      /* id selector */
      #prefix__svg-addauthor-b {
        fill: #F00;
      }
      
      /* attribute selector */
      [fill='#FFF'] {
        fill: #FDCD47;
      }
    `

    Keywords

    none

    Install

    npm i @manuscripts/assets

    DownloadsWeekly Downloads

    125

    Version

    0.6.1

    License

    CPAL-1.0

    Unpacked Size

    5.28 MB

    Total Files

    434

    Last publish

    Collaborators

    • avatar