mirror of
https://github.com/zoriya/bubbles.git
synced 2026-08-16 01:43:21 +00:00
feat: progress
This commit is contained in:
@@ -175,7 +175,7 @@ type Model struct {
|
||||
}
|
||||
|
||||
// New returns a model with default values.
|
||||
func New(opts ...Option) Model {
|
||||
func New(ctx *tea.Context, opts ...Option) Model {
|
||||
m := Model{
|
||||
id: nextID(),
|
||||
Width: defaultWidth,
|
||||
@@ -185,7 +185,7 @@ func New(opts ...Option) Model {
|
||||
EmptyColor: "#606060",
|
||||
ShowPercentage: true,
|
||||
PercentFormat: " %3.0f%%",
|
||||
colorProfile: termenv.ColorProfile(),
|
||||
colorProfile: ctx.Renderer.ColorProfile(),
|
||||
}
|
||||
if !m.springCustomized {
|
||||
m.SetSpringOptions(defaultFrequency, defaultDamping)
|
||||
|
||||
Reference in New Issue
Block a user