Code Monkey home page Code Monkey logo

Comments (12)

mattmacpherson avatar mattmacpherson commented on June 18, 2024 1

@paranoidjk Thank you for the quick reply! Right now I'm using a really awkward css hack to kind of align it to the right:

.right-tabs-bar {
  margin-left: 64%;
}

If you look closely, you can tell it's not actually aligned to the right. That's the closest I could get it to the edge though. I'm definitely not a CSS guy so if anyone has any suggestions I'm all ears! Otherwise, I could tinker with the code and submit a pull request so this (wonderful!) package supports right aligned tabs natively.

from tabs.

paranoidjk avatar paranoidjk commented on June 18, 2024 1

hmm, i understand your problem, But right now i do not have time to do this feature, you can use css to do it temporarily.

And PR is welcome.

from tabs.

mattmacpherson avatar mattmacpherson commented on June 18, 2024

Anyone?

from tabs.

Ohar avatar Ohar commented on June 18, 2024

@method-x Looks like you are free to make a pull request with it.

from tabs.

paranoidjk avatar paranoidjk commented on June 18, 2024

interesting,i think there actually is no something what we call direction of the tabs component.

maybe you can just simply set the defaultActiveKey to be the last tabKey?

from tabs.

paranoidjk avatar paranoidjk commented on June 18, 2024

close for no response.

from tabs.

mattmacpherson avatar mattmacpherson commented on June 18, 2024

@paranoidjk The defaultActiveKey is already set to the last tab. For a live demonstration of what I mean, go here. For the time being, I had to resort to a CSS hack that still doesn't quite get it right. :/

from tabs.

paranoidjk avatar paranoidjk commented on June 18, 2024

@method-x looks fine? can you give a codepen demo?

from tabs.

mattmacpherson avatar mattmacpherson commented on June 18, 2024

@paranoidjk I will take a peek at the code first chance I get and submit a pull request. In the mean time, any idea how to do this with CSS? Floating right doesn't work.

from tabs.

paranoidjk avatar paranoidjk commented on June 18, 2024

because ScrollInkTabBar set width to 9999px for scroll https://github.com/react-component/tabs/blob/master/assets/index/top.less#L21, float right won't work

from tabs.

HeitorKun-Criasol avatar HeitorKun-Criasol commented on June 18, 2024

has a better way of doing this been implemented already?

from tabs.

smtlab avatar smtlab commented on June 18, 2024

Works perfectly - <Tabs value={1} style={{ float: 'right' }}></Tabs>

from tabs.

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.