diff --git a/src/views/components/common/Button/Button.tsx b/src/views/components/common/Button/Button.tsx index 0c5b158b..902325bd 100644 --- a/src/views/components/common/Button/Button.tsx +++ b/src/views/components/common/Button/Button.tsx @@ -8,6 +8,7 @@ interface Props { onClick?: () => void; type?: 'primary' | 'secondary' | 'tertiary' | 'danger' | 'warning' | 'success' | 'info'; disabled?: boolean; + title?: string; testId?: string; } @@ -22,6 +23,7 @@ export function Button({ testId, children, disabled, + title, onClick, }: React.PropsWithChildren): JSX.Element { return ( @@ -31,6 +33,7 @@ export function Button({ className={classNames(styles.button, className, styles[type ?? 'primary'], { [styles.disabled]: disabled, })} + title={title} onClick={disabled ? undefined : onClick} > {children} diff --git a/src/views/components/common/Link/Link.tsx b/src/views/components/common/Link/Link.tsx index 9d0289b7..9dd9488b 100644 --- a/src/views/components/common/Link/Link.tsx +++ b/src/views/components/common/Link/Link.tsx @@ -7,6 +7,7 @@ import styles from './Link.module.scss'; type Props = Omit & { url?: string; disabled?: boolean; + title?: string; }; /** diff --git a/src/views/components/common/Text/Text.tsx b/src/views/components/common/Text/Text.tsx index 7efa0323..15afe701 100644 --- a/src/views/components/common/Text/Text.tsx +++ b/src/views/components/common/Text/Text.tsx @@ -11,6 +11,7 @@ export type TextProps = { span?: boolean; className?: string; onClick?: () => void; + title?: string; align?: React.CSSProperties['textAlign']; style?: React.CSSProperties; }; @@ -32,14 +33,14 @@ export default function Text(props: PropsWithChildren) { if (props.span) { return ( - + {props.children} ); } return ( -
+
{props.children}
); diff --git a/src/views/components/injected/CoursePopup/CourseHeader/CourseButtons/CourseButtons.tsx b/src/views/components/injected/CoursePopup/CourseHeader/CourseButtons/CourseButtons.tsx index 06279fdc..417eebde 100644 --- a/src/views/components/injected/CoursePopup/CourseHeader/CourseButtons/CourseButtons.tsx +++ b/src/views/components/injected/CoursePopup/CourseHeader/CourseButtons/CourseButtons.tsx @@ -85,19 +85,30 @@ export default function CourseButtons({ course, activeSchedule }: Props) { disabled={!course.instructors.length} type='primary' className={styles.button} + title='Search for this professor on RateMyProfessor' > RateMyProf - -