You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The value "blue" is passed to Button() in settings. So {settings.label === "blue"} and label === "red".
The button shows "red" and ignores the parameter.
In order to support both cases, a function similar to ButtonGroup().getOpts() needs to be added to override label with {settings.label}. Je ne parle pas typescript, but I think the idea is the same.
const getOpts = ({ label: _label, opts: _opts }: ButtonGroupInternalOpts) => {
let label = typeof _label === 'string' ? (_label.trim() === '' ? null : _label) : _label
let opts = _opts
if (typeof _opts.opts === 'object') {
if (opts.label !== undefined) {
label = _opts.label as any
}
opts = _opts.opts
}
return { label, opts: opts as ButtonGroupOpts }
}
The text was updated successfully, but these errors were encountered:
currently the code in Button.tsx is
But when called
The value "blue" is passed to Button() in settings. So {settings.label === "blue"} and label === "red".
The button shows "red" and ignores the parameter.
In order to support both cases, a function similar to ButtonGroup().getOpts() needs to be added to override label with {settings.label}. Je ne parle pas typescript, but I think the idea is the same.
The text was updated successfully, but these errors were encountered: