refactor note card to component

This commit is contained in:
2024-03-12 13:28:20 +08:00
parent 2e2629fe0a
commit f17bfa2a9e
10 changed files with 121 additions and 68 deletions
@@ -0,0 +1,3 @@
export default {
component: true,
};
+25
View File
@@ -0,0 +1,25 @@
import { Component, ReactNode } from 'react';
import NoteCard from '@/components/NoteCard/NoteCard';
import { TicketNote } from '@/pages/TicketDetail/TicketNote';
import { View } from '@tarojs/components';
interface NoteListProps {
noteList: Array<TicketNote>;
}
export default class NoteList extends Component<NoteListProps, {}> {
props: Readonly<NoteListProps> = {
noteList: [],
};
render(): ReactNode {
return (
<View>
{this.props.noteList.map((note, idx) => (
<View key={idx} style={{ marginTop: 8 }}>
<NoteCard note={note} />
</View>
))}
</View>
);
}
}