color
This commit is contained in:
parent
a7b2e9a6f3
commit
39b3f8680c
2 changed files with 18 additions and 0 deletions
18
README.md
18
README.md
|
@ -32,6 +32,24 @@ sp.stop
|
|||
|
||||
`chars`: you can choose charset from [CHARSET](src/spinner/charset.cr) `default = CHARSET[:pipe]`
|
||||
|
||||
## Examples
|
||||
|
||||
```crystal
|
||||
require "spinner"
|
||||
require "colorize"
|
||||
|
||||
chars = CHARSET[:arrow].map do |c|
|
||||
c.colorize(:light_green)
|
||||
end
|
||||
|
||||
spin = Spin.new(0.2, chars)
|
||||
spin.start
|
||||
sleep 3
|
||||
spin.stop
|
||||
```
|
||||
|
||||
![Color](/images/color.gif)
|
||||
|
||||
## Contributing
|
||||
|
||||
1. Fork it ( https://github.com/askn/spinner/fork )
|
||||
|
|
BIN
images/color.gif
Normal file
BIN
images/color.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 19 KiB |
Loading…
Reference in a new issue