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

Pass fontColor props to custom component #103

Open
nicolasdeory opened this issue Jan 17, 2022 · 0 comments
Open

Pass fontColor props to custom component #103

nicolasdeory opened this issue Jan 17, 2022 · 0 comments

Comments

@nicolasdeory
Copy link

nicolasdeory commented Jan 17, 2022

<OptionItem
key={_optionId}
optionsAmount={options.length}
className={`${CLASS_NAMES_PREFIX}-option`}
optionBorderRadius={optionBorderRadius}
>
<OptionItemLabel
className={`${CLASS_NAMES_PREFIX}-option-label`}
selected={selectedIndex === index}
isRawText={isRawText}
disabled={disabled}
aria-disabled={disabled}
{...(isRawText ? labelRawTextProps : {})}
>
<OptionInput
type="radio"
id={_optionId}
onChange={(): void => handleOnClick(index)}
checked={selectedIndex === index}
/>
{option.label}
</OptionItemLabel>

When a custom component is passed as a label, instead of rawText, the fontColor property is not passed as a property. Changing this would make making custom components that reuse the existing logic easier.

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