Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lcd label not working #245

Open
salihkesepara opened this issue Jan 8, 2024 · 0 comments
Open

lcd label not working #245

salihkesepara opened this issue Jan 8, 2024 · 0 comments

Comments

@salihkesepara
Copy link

I'm trying to use this code but label: 'Status' gives me error.

const lcd = contrib.lcd({
  label: 'Status',
  elements: 4,
  top: 0,
  left: '50%',
  height: '25%',
  width: '25%',
  border: {
    type: 'line',
    fg: 'cyan',
  },
})

Error

Type '"Status"' is not assignable to type '"Storage Remaining"'.

blessed-contrib

export interface LcdOptions extends CanvasOptions {
    segmentWidth?: number// how wide are the segments in % so 50% = 0.5
    segmentInterval?: number// spacing between the segments in % so 50% = 0.550% = 0.5
    strokeWidth?: number// spacing between the segments in % so 50% = 0.5
    elements?: number// how many elements in the display. or how many characters can be displayed.
    display?: number// what should be displayed before first call to setDisplay
    elementSpacing?: number// spacing between each element
    elementPadding?: number// how far away from the edges to put the elements
    color?: 'white' // color for the segments
    label?: 'Storage Remaining'
}

I've just copy and past that code from the blessed-contrib package. At this point I can't change label. It should be always 'Storage Remaining' or empty.

Version

"blessed-contrib": "^4.11.0",

salihkesepara added a commit to salihkesepara/blessed-contrib that referenced this issue Jan 9, 2024
That issue is fixed

yaronn#245
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant