tabler / tabler-icons

A set of over 5700 free MIT-licensed high-quality SVG icons for you to use in your web projects.
https://tabler.io/icons
MIT License
18.33k stars 919 forks source link

Stroke prop not accepting a Number. Has to be a ColorValue. #1190

Closed jbejas closed 4 months ago

jbejas commented 4 months ago

Description

You cannot set the stroke prop value to any Icon as it does not accept a Number value. It requires a ColorValue value. If the stroke prop is set, the icon dissapears.

"Type 'number' is not assignable to type 'ColorValue'."

Package

Version

3.11.0

Browser

Operating system

Steps to reproduce

  1. Install the library in your react native project.
  2. import any Icon from the library in any component or view.
  3. Add the stroke prop with a numeric value.
  4. see the error on TS. "Type 'number' is not assignable to type 'ColorValue'."

Checklist

BG-Software-BG commented 4 months ago

It's not a bug – the stroke property is for setting the color of the stroke/icon. To change the width of the stroke, you should use the strokeWidth property, which accepts numbers.

See more at: https://tabler.io/docs/icons/react-native.