通用组件开发
This commit is contained in:
7
src/components/List/index.scss
Normal file
7
src/components/List/index.scss
Normal file
@@ -0,0 +1,7 @@
|
||||
.list {
|
||||
background: #fafafa;
|
||||
margin-top: 12px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 5px;
|
||||
}
|
||||
16
src/components/List/index.tsx
Normal file
16
src/components/List/index.tsx
Normal file
@@ -0,0 +1,16 @@
|
||||
import { View } from '@tarojs/components'
|
||||
import './index.scss'
|
||||
|
||||
interface ListProps {
|
||||
children: React.ReactNode
|
||||
}
|
||||
|
||||
const List: React.FC<ListProps> = ({ children }) => {
|
||||
return (
|
||||
<View className="list">
|
||||
{children}
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
export default List
|
||||
Reference in New Issue
Block a user