* refactor(css): only load base styles, add css task, cleanup exports * style(base): add edge label bg * refactor(css): use css-utils * feat(core): add Panel component * refactor(background): cleanup * refactor(css-handling): cleanup
30 lines
760 B
TypeScript
30 lines
760 B
TypeScript
import React from 'react';
|
|
|
|
import Panel from '../Panel';
|
|
import { PanelPosition, ProOptions } from '../../types';
|
|
|
|
type AttributionProps = {
|
|
proOptions?: ProOptions;
|
|
position?: PanelPosition;
|
|
};
|
|
|
|
function Attribution({ proOptions, position = 'bottom-right' }: AttributionProps) {
|
|
if (proOptions?.hideAttribution) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<Panel
|
|
position={position}
|
|
className="react-flow__attribution"
|
|
data-message="Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev"
|
|
>
|
|
<a href="https://reactflow.dev" target="_blank" rel="noopener noreferrer" aria-label="React Flow attribution">
|
|
React Flow
|
|
</a>
|
|
</Panel>
|
|
);
|
|
}
|
|
|
|
export default Attribution;
|