[Divider] Support displaying text inside
See original GitHub issueHow about having text inside the divider? <Divider>Text</Divider>
Result would be like this:
sample code:
<>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista
probare, quae sunt a te dicta? Refert tamen, quo modo.
</p>
<Divider>Text</Divider>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista
probare, quae sunt a te dicta? Refert tamen, quo modo.
</p>
<Divider orientation="left">Left Text</Divider>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista
probare, quae sunt a te dicta? Refert tamen, quo modo.
</p>
<Divider orientation="right">Right Text</Divider>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista
probare, quae sunt a te dicta? Refert tamen, quo modo.
</p>
</>
just like ant design has: https://ant.design/components/divider/#header
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:11 (10 by maintainers)
Top Results From Across the Web
[Divider] Support displaying text inside · Issue #21820 - GitHub
How about having text inside the divider? Text Result would be like this: sample code: <> Lorem ipsum dolor sit amet, consectetur adipiscing ......
Read more >Add centered text to the middle of a horizontal rule [duplicate]
This is the cleanest solution in this thread to be honest, the issue with no text can be overlooked since you would want...
Read more >CSS Nugget: Text Divider in Flexbox - DEV Community
In this tutorial, we'll create a fluid text divider with a single <div> , with the help of Flexbox and pseudo-elements.
Read more >How To Create Dividers with CSS - W3Schools
How To Create Dividers. Step 1) Add HTML: Example. <hr class="dashed">
Read more >mjml-guides – Documentation for MJML - The Responsive ...
Here is an example showing the use in combination with the css-class attribute, which is supported by all body components. <mjml> <mj-head> <mj-attributes>...
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
@lsqproduction You can find the documentation in https://next.material-ui.com/components/dividers/#dividers-with-text.
@oliviertassinari can you take a look at this code? It is in rough form and many things are still missing, but is this good approach? I think passing text as a prop (text) will be better than passing it as children.