Actually, re-looking at the source code of the component, label is always used. Since overflowing an empty string makes no sense, I'd make it required at least.
children is instead optional since it doesn't replace the label per se, but lets you customise rendering downstream after the ellipsis style has been applied by wrapping the label content in a span.
Current status is that it is impossible to use it correctly from a TS project if you want to customise children.
regression introduced in #1374 See discussion at: https://github.com/buildo/react-components/pull/1374#discussion_r324690721
Actually, re-looking at the source code of the component,
label
is always used. Since overflowing an empty string makes no sense, I'd make it required at least.children
is instead optional since it doesn't replace thelabel
per se, but lets you customise rendering downstream after the ellipsis style has been applied by wrapping thelabel
content in a span.Current status is that it is impossible to use it correctly from a TS project if you want to customise
children
.