Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// Resolve styles using resolved variables, merge results, allow props.styles to override
const mergedStyles: ComponentSlotStylesPrepared = mergeComponentStyles(
theme.componentStyles[displayName],
withDebugId({ root: props.design }, 'props.design'),
withDebugId({ root: props.styles }, 'props.styles'),
withDebugId({ root: animationCSSProp }, 'props.animation'),
)
const accessibility: ReactAccessibilityBehavior = getAccessibility(
displayName,
stateAndProps,
actionHandlers,
rtl,
)
const unhandledProps = getUnhandledProps(handledProps, props)
const styleParam: ComponentStyleFunctionParam = {
displayName,
props: stateAndProps,
variables: resolvedVariables,
theme,
rtl,
disableAnimations,
}
// Fela plugins rely on `direction` param in `theme` prop instead of RTL
// Our API should be aligned with it
// Heads Up! Keep in sync with Design.tsx render logic
const direction = rtl ? 'rtl' : 'ltr'
const felaParam = {
theme: { direction },