Coder Social home page Coder Social logo

Improve the progress component about vue-termynal HOT 3 CLOSED

rakr avatar rakr commented on July 21, 2024
Improve the progress component

from vue-termynal.

Comments (3)

Lehoczky avatar Lehoczky commented on July 21, 2024

Text before the line

You can add text before the bar by using CSS:

<template>
  <v-termynal>
    <vt-progress class="uninstall" :progress-length="30" />
  </v-termynal>
</template>

<style>
.uninstall::before {
  content: "Uninstall in progress:";
  padding-right: 5px;
}
</style>

I can add an example to the docs if you think this is a good a solution the problem.

Indeterminate progress

I like the idea of it. We could create a new component for this, and this way the original progress component could stay simpler and the user can import the progress indicator they need.

about the div

The progress line is a <span> element but with the display: block style. You can change this with CSS too by overriding the default style of the .vt__line class.

Let me know if this helped you with your use case!

from vue-termynal.

rakr avatar rakr commented on July 21, 2024

I tried adding the text before in the CSS, but in my use case it became quickly overwhelming, to many classes as I had several progress components.

I have raised this PR #4 that solves these two topics, using a slot like for vt-input, and adding adding the property progress-unknown to the progress component.

Let me know your thoughts.

from vue-termynal.

Lehoczky avatar Lehoczky commented on July 21, 2024

You could use the attr() css function to dynamically set the content of the ::before element, but at this point I agree, that using slot is simpler and more intuitive.

from vue-termynal.

Related Issues (3)

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.