mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-15 05:28:00 +00:00
18 lines
429 B
TypeScript
18 lines
429 B
TypeScript
import { uniqueId } from '../../utils';
|
|
import { Component } from 'react';
|
|
import { saveTips } from './tip-handler';
|
|
import { TipConfig } from '../../types';
|
|
|
|
export default class EmbedTip extends Component<TipConfig> {
|
|
private id = uniqueId('tips$');
|
|
|
|
componentWillUnmount() {
|
|
saveTips(this.id, null);
|
|
}
|
|
|
|
render() {
|
|
saveTips(this.id, this.props);
|
|
return <meta data-role="tip" data-tip-id={this.id} />;
|
|
}
|
|
}
|