feat: update README and enhance Menu component with teacher selection functionality
- Updated project title in README.md to reflect the new focus on "名师工作室". - Enhanced Image component to accept custom styles. - Implemented teacher selection feature in Menu component, allowing users to select and display different teacher avatars with corresponding positions and transitions.
This commit is contained in:
1 parent
95d594c2aa
commit
29029bb608
8 files changed
+81
-5
No files matched your search
@@ -2,6 +2,7 @@ import { useState, useRef, useEffect } from "react";
|
||||
import { clsx } from "clsx";
|
||||
|
||||
interface ImageProps {
|
||||
style?: React.CSSProperties;
|
||||
src: string;
|
||||
children?: React.ReactNode;
|
||||
alt?: string;
|
||||
@@ -23,6 +24,7 @@ interface ImageProps {
|
||||
}
|
||||
|
||||
export default function Image({
|
||||
style,
|
||||
src,
|
||||
children,
|
||||
alt,
|
||||
@@ -113,7 +115,7 @@ export default function Image({
|
||||
"cursor-pointer transition-all duration-300 hover:scale-105 hover:brightness-110",
|
||||
className
|
||||
)}
|
||||
style={{ width, height }}
|
||||
style={{ width, height, ...style }}
|
||||
onClick={onClick}
|
||||
>
|
||||
{/* 加载占位符 */}
|
||||
|
||||
Reference in new issue
Block a user