Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('renders default `component.remirror:icon` styles', () => {
const { container } = render(
,
);
const svg = container.querySelector('svg');
expect(svg).toHaveStyle(
`color: ${baseTheme.colors.text}; background-color: ${baseTheme.colors.background};`,
);
});
it('renders default styles', () => {
const { container } = render(
,
);
const svg = container.querySelector('svg');
expect(svg).toHaveStyle(
`color: ${baseTheme.colors.text}; background-color: ${baseTheme.colors.background};`,
);
});
export const DropCursorComponent = ({ options, type, container }: DropCursorComponentProps) => {
const { sx } = useRemirrorTheme();
const { Component, ...rest } = options;
return Component ? (
) : type === 'block' ? (
<div>
) : (
<span>
</span></div>
) : type === 'block' ? (
<div>
) : (
<span>
</span>
);
};
</div>
export const DropCursorComponent = ({ options, type, container }: DropCursorComponentProps) => {
const { sx } = useRemirrorTheme();
const { Component, ...rest } = options;
return Component ? (
) : type === 'block' ? (
<div>
) : (
<span>
</span>
);
};</div>
RightIconComponent,
renderRightIcon,
rightIconProps = Object.create(null),
color,
backgroundColor,
fontWeight,
minWidth,
width,
variant = 'default',
styles,
children,
...props
},
ref,
) => {
const remirrorTheme = useRemirrorTheme();
const { sxx } = remirrorTheme;
const colorStyles = omitUndefined({ color, backgroundColor });
const otherStyles = { fontWeight, width, minWidth };
const paddedLeftIconProps = {
...leftIconProps,
styles: sxx(
renderRightIcon || RightIconComponent || content ? { paddingRight: 1 } : undefined,
leftIconProps.styles,
),
};
const leftIcon = renderLeftIcon
? renderLeftIcon({ remirrorTheme })
: LeftIconComponent && ;
const paddedRightIconsProps = {