mirror of
https://github.com/primer/css.git
synced 2024-12-01 12:42:32 +03:00
.. | ||
lib | ||
index.scss | ||
LICENSE | ||
package.json | ||
README.md | ||
stories.js |
Primer / Progress Bar
TODO: fill in this description later
This repository is a module of the full primer repository.
Install
This repository is distributed with npm. After installing npm, you can install primer-progress-bar
with this command.
$ npm install --save primer-progress-bar
Usage
The source files included are written in Sass (SCSS) You can simply point your sass include-path
at your node_modules
directory and import it like this.
@import "primer-progress-bar/index.scss";
You can also import specific portions of the module by importing those partials from the /lib/
folder. Make sure you import any requirements along with the modules.
Build
For a compiled CSS version of this module, an npm script is included that will output a css version to build/build.css
The built css file is also included in the npm package:
$ npm run build
Default Progress Bar
<div class="progress-bar my-4">
<div class="progress" style="width: 50%">
</div>
</div>
<span class="flex-progress-bar d-flex bg-gray rounded-1 overflow-hidden">
<span class="height-full bg-green" style="width:50%"></span>
<span class="height-full bg-purple" style="width:25%"></span>
<span class="height-full bg-red" style="width:5%"></span>
</span>
Small Progress Bar
<div class="progress-bar progress-bar-small my-4">
<div class="progress" style="width:50%"></div>
</div>
<span class="flex-progress-bar-small d-flex bg-gray rounded-1 overflow-hidden">
<span class="height-full bg-green" style="width:50%"></span>
<span class="height-full bg-purple" style="width:25%"></span>
<span class="height-full bg-red" style="width:5%"></span>
</span>
Progress Bar With Tooltip
<div class="tooltipped tooltipped-n mt-3" aria-label="78 done / 6 in progress / 2 to do">
<div class="progress-bar my-4">
<div class="progress" style="width: 50%">
</div>
</div>
</div>
<div class="tooltipped tooltipped-n mt-3" aria-label="78 done / 6 in progress / 2 to do">
<span class="flex-progress-bar d-flex bg-gray rounded-1 overflow-hidden">
<span class="flex-progress to-do height-full bg-green" style="width: 50%"></span>
</span>
</div>
WIP Reverse Progress
<div class="reverse-progress-container">
<div style="width:50%" class="reverse-progress-bar" ></div>
</div>
WIP Progress Bar Inline
<div class="progress-bar-inline">
<span class="progress-bar">
<span class="progress" style="width:50%"> </span>
</span>
</div>
WIP Progress Gradient [Test]
<div class="flex-progress-bar--gradient d-flex bg-gray rounded-1 overflow-hidden"></div>