Closed DonHarishAxe closed 6 years ago
Yeah, this would be a nice feature to document. It might even make a good high-level option. Anyways, if you dig in styles.js (as the docs recommend) you can see how all the internal styling works.
To set a custom border radius, use the following code. Note that you can also use the customStyles
object on a per-step basis to change the border radius between different steps if needed.
const customStyles = {
spotlight: {
// Set your border-radius here!
borderRadius: 100
}
};
<Joyride
styles={customStyles }
// ...other joyride props
/>
Yep, changing the styles will do!
I'm getting an error when trying this w/ TypeScript ("@types/react-joyride": "2.0.0") and the latest react-joyride version as of today.
[ts] Type '{ spotlight: { borderRadius: number; }; }' has no properties in common with type 'StepStyles'.
index.d.ts(173, 5): The expected type comes from property 'styles' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes
Any ideas?
TypeScript file is missing definitions for anything that goes outside of defaultOptions which is options. Either add the types or just override with these setting.
interface IStepEx extends Step { styles?: IStepStylesEx; }
interface IStepStylesEx extends StepStyles {
}
If you want to get this issue fixed quickly, make sure to send a public URL or codesandbox example.