'X of Y' template in props
See original GitHub issueHi Joss,
Just wondering if you can implement a little improvement when you change anything in the library next time. It is about making X of Y
something you can pass as a prop. This will be extremely useful in multilingual interfaces.
Here is how a feature can look like:
<Lightbox
images={[{ src: 'http://example.com/img1.jpg' }, { src: 'http://example.com/img2.jpg' }]}
imageCountTemplate="{current} из {total}" // ← Russian
/>
Certainly, imageCountTemplate
can be undefined, which will output {current} of {total}
as this is happening now.
Cheers!
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Render Props - React
The term “render prop” refers to a technique for sharing code between React components using a prop whose value is a function. A...
Read more >Motion components | Framer for Developers
Transform properties are accelerated by the GPU, and therefore animate smoothly. They can be set and animated individually as: Translate shortcuts: x ,...
Read more >Page X of Y doesn't work in Microsoft Word!
I want the filename in the footer of every document. Margins Missing - White Space · Mapped Content Controls and Document Properties ·...
Read more >Style Props - Chakra UI
Style props are a way to alter the style of a component by simply passing props to it. It helps to save time...
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
@MilosJo in
1.x
you can just replace theFooterCount
component with whatever you like. Check out the component docs for more info.This isn’t working with new
1.x
. And it is pretty neat feature.