More flexibility for templating output component
See original GitHub issueI’d love to use this module but would like to do some different things with the output component. I’m not sure what the best way to approach this would be — whether providing a slew of new options, or a templating system that would allow custom, or something else.
Here are things that I would like to do:
- Check propTypes to ensure that the user has provided
style.width
andstyle.height
, which are often necessary for IE. - Add
focusable="false"
to the everysvg
element. - Add an
aria-labelled
attribute to thesvg
element whose value is a generated id that is used by a<title>
element that is the first child of thesvg
, which receivesthis.props.title
.
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Using templates and slots - Web Components | MDN
This article explains how you can use the <template> and <slot> elements to create a flexible template that can then be used to...
Read more >Implementing Flexible Training Templates: Why and How
In summary, using a flexible template is a viable autoregulation strategy and can be implemented with varying degrees of flexibility. Remember, ...
Read more >Extension of <template> - web components - WICG
Advantages: Most flexibility per template output. Precompilation of library code would be possible internally by browsers.
Read more >Flexible Website Templates | Website design - Top Floor
Say hello to flexible website development templates! ... flexible template design as a collection of reusable components assembled to build ...
Read more >tornado.template — Flexible output generation
tornado.template — Flexible output generation¶. A simple template system that compiles templates to Python code. Basic usage looks like: t = template.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For anybody who might be looking at this and wonder how to add
focusable="false"
on every SVG element:The following is a way to do this in your webpack config, provided you are on react-svg-loader@^2.0.0:
You could do this for any attribute. For example, we needed
aria-hidden="true"
on every SVG element@sleexyz Thank you for sharing how to add
focusable='false'
to all SVG elements. Your configuration worked for my webpack setup.