GithubHelp home page GithubHelp logo

Left Padding Example about react-sidenav HOT 5 CLOSED

wmira avatar wmira commented on August 21, 2024
Left Padding Example

from react-sidenav.

Comments (5)

wmira avatar wmira commented on August 21, 2024

@RunnerTx do you want to do something like this? https://codesandbox.io/s/r0jyry8pmq
What was changed is that you would need to specifically specify the item template, which can now be inherited from the Default template. Reason being different templates can be provided and it can know how to render elements under it.

from react-sidenav.

RunnerTx avatar RunnerTx commented on August 21, 2024

@wmira that is kind of what I was looking for, but I wanted the border-left color like the original example. When I try to modify your latest example, it puts the left border on all items (Nav, NavIcon, and NavText). Is there any way to just put the border-left around just Nav?
https://codesandbox.io/s/xpm02wzr6z

Thanks again.

from react-sidenav.

wmira avatar wmira commented on August 21, 2024

@RunnerTx i see what you mean. There seem to be a bug, what you have is correct but the problem is the className is getting applied to children. Will release a fix for this later. It is on the Default renderer. When it renders the NavIcon or NavText, it should not have passed the full props of the container, e.g. it is doing { ...this.props }.

from react-sidenav.

wmira avatar wmira commented on August 21, 2024

@RunnerTx latest build should now enable adding the left border indicator: https://codesandbox.io/s/yvwj8k9q6j

from react-sidenav.

RunnerTx avatar RunnerTx commented on August 21, 2024

@wmira - thanks. I verified the latest build resolves the issue.

from react-sidenav.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.