Coder Social home page Coder Social logo

Comments (14)

jljsj33 avatar jljsj33 commented on July 22, 2024

Please go to understand the less.

from drawer.

romanown avatar romanown commented on July 22, 2024

from drawer.

jljsj33 avatar jljsj33 commented on July 22, 2024

We will not do this, and we can replace it with less.

close

https://github.com/react-component/drawer/blob/master/assets/index.less#L31

open

https://github.com/react-component/drawer/blob/master/assets/index.less#L161

from drawer.

romanown avatar romanown commented on July 22, 2024

thanks for the detailed description. I understand that. I did exactly as you wrote. but it is very inconvenient to change the internal structure of the module. it is much more convenient to pass all this parameters and properties. on one page you need some parameters and on the other you may need others. or do you need to install several components and change them?

from drawer.

romanown avatar romanown commented on July 22, 2024

can i use in the drawer-handle-icon not the css transform but also the image_open.png and image_close.png?

from drawer.

jljsj33 avatar jljsj33 commented on July 22, 2024
handler boolean | ReactElement true true or false or ReactElement, default:<divclassName="drawer-handle">;

from drawer.

romanown avatar romanown commented on July 22, 2024

give example plese. i am do not understand as do it.

from drawer.

romanown avatar romanown commented on July 22, 2024

I do not want to replace the item but instead its 3 strips and cross put a picture but use the built-in the handler

from drawer.

romanown avatar romanown commented on July 22, 2024

I want to make on a light background shows a dark picture and a dark light and also change the picture depending on the page. this will make the drawer more versatile and allow you to use it for different tasks.

from drawer.

jljsj33 avatar jljsj33 commented on July 22, 2024
class Demo extends React.Component {
  state = {
    open: false,
  }
  onChange = (open) => {
    this.setState({
      open
    })
  }
  render() {
    return (
      <Drawer onChange={this.onChange} handler={<div><img src={this.state.open ? 'image_open.png' : 'image_close.png'} /></div>} />
    );
  }
}

from drawer.

romanown avatar romanown commented on July 22, 2024

thank You very match.

from drawer.

romanown avatar romanown commented on July 22, 2024

it will be more convenient if you add the opened property to the drawer. then don't write so much. example
handler={<div><img src={drawer.opened ? 'image_open.png' : 'image_close.png'}

from drawer.

romanown avatar romanown commented on July 22, 2024

it is necessary to change the color of the elements of the handler depending on what page is the menu. but do not use the state yourself as in the example above. you also need the property to know whether the drawer is open or closed without using the state.

from drawer.

romanown avatar romanown commented on July 22, 2024

on the website the main page is dark and the rest are light. I need to make this element light on the front page and dark on the other pages. as well as the border around the element when the driwer is opened and to remove the curb when the driwer is closed.

from drawer.

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.