Move variant into custom component

This commit is contained in:
Manav Rathi
2024-08-23 09:51:57 +05:30
parent 7ddee7d75e
commit f0bf07a384

View File

@@ -273,7 +273,7 @@ const WatchEntry: React.FC<WatchEntryProps> = ({ watch, removeWatch }) => {
)}
<EntryContainer>
<EntryHeading watch={watch} />
<FolderPath variant="small">{watch.folderPath}</FolderPath>
<FolderPath>{watch.folderPath}</FolderPath>
</EntryContainer>
</HorizontalFlex>
<EntryOptions {...{ confirmStopWatching }} />
@@ -306,7 +306,11 @@ const EntryHeading: React.FC<EntryHeadingProps> = ({ watch }) => {
);
};
const FolderPath = styled(Typography)(({ theme }) => ({
const FolderPath: React.FC<React.PropsWithChildren> = ({ children }) => (
<FolderPath_ variant="small">{children}</FolderPath_>
);
const FolderPath_ = styled(Typography)(({ theme }) => ({
overflow: "hidden",
textOverflow: "ellipsis",
color: theme.colors.text.muted,