Skip to content

Commit

Permalink
Update imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas-C committed Jul 8, 2024
1 parent 50eb8a8 commit cac426a
Show file tree
Hide file tree
Showing 16 changed files with 28 additions and 40 deletions.
6 changes: 3 additions & 3 deletions src/components/CompetenceGoalTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const CompetenceGoalTab = ({ items, type }: Props) => {
<CompetenceItemWrapper key={index}>
<hgroup>
<StyledHeading element="h2" headingStyle="h2" margin="none">
<MenuBook size="normal" />
<MenuBook />
{item.title}
</StyledHeading>
{type === "goal" && <Text margin="none">{t("competenceGoals.competenceGoalTitle")}</Text>}
Expand Down Expand Up @@ -164,7 +164,7 @@ export const CompetenceItem = ({ item, isOembed, showLinks }: CompetenceItemProp
</Text>
{showLinks && (
<StyledSafeLinkButton to={goal.url} target={isOembed ? "_blank" : "_self"} variant="outline">
<Search size="normal" />
<Search />
{t("competenceGoals.competenceGoalResourceSearchText", { code: goal.id })}
</StyledSafeLinkButton>
)}
Expand All @@ -179,7 +179,7 @@ export const CompetenceItem = ({ item, isOembed, showLinks }: CompetenceItemProp
</Text>
{showLinks && (
<StyledSafeLinkButton to={element.url} target={isOembed ? "_blank" : "_self"} variant="outline">
<Search size="normal" />
<Search />
{t("competenceGoals.coreResourceSearchText", { code: element.id })}
</StyledSafeLinkButton>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/components/CompetenceGoals.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ const CompetenceGoals = ({ codes, subjectId, supportedLanguages, isOembed }: Pro
<ModalContent size="full">
<ModalHeader>
<ModalTitle>
<FooterHeaderIcon size="normal" style={{ marginRight: "20px" }} />
<FooterHeaderIcon style={{ marginRight: "20px" }} />
{t("competenceGoals.modalText")}
</ModalTitle>
<ModalCloseButton />
Expand Down
4 changes: 2 additions & 2 deletions src/components/Learningpath/LearningpathFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ const LearningpathFooter = ({
to={toLearningPath(learningPath.id, previousStep.id, resource)}
aria-label={t("learningPath.previousArrow")}
>
<Back size="normal" />
<Back />
<LinkText>{previousStep.title}</LinkText>
</StyledSafeLink>
) : (
Expand All @@ -164,7 +164,7 @@ const LearningpathFooter = ({
aria-label={t("learningPath.nextArrow")}
>
<LinkText>{nextStep.title}</LinkText>
<Forward size="normal" />
<Forward />
</StyledSafeLink>
) : (
<div />
Expand Down
8 changes: 1 addition & 7 deletions src/components/MyNdla/FoldersPageTitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,7 @@ const FoldersPageTitle = ({ loading = false, selectedFolder, enableBreadcrumb =
}
isLoading={loading}
>
{selectedFolder ? (
selectedFolder.status === "shared" ? (
<FolderSharedOutlined size="large" />
) : (
<FolderOutlined size="large" />
)
) : null}
{selectedFolder ? selectedFolder.status === "shared" ? <FolderSharedOutlined /> : <FolderOutlined /> : null}
<MyNdlaTitle title={selectedFolder?.name ?? t("myNdla.myFolders")} />
</WhileLoading>
</TitleRow>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Topic/TopicMetaImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ const TopicMetaImage = ({ visualElementEmbedMeta, metaImage: articleMetaImage, v
/>
<TopicHeaderOverlay data-overlay="" />
<ExpandVisualElementButton data-indicator="">
{VisualElementIcon && <VisualElementIcon size="normal" />}
{VisualElementIcon && <VisualElementIcon />}
</ExpandVisualElementButton>
</VisualElementButton>
</ModalTrigger>
Expand Down
16 changes: 6 additions & 10 deletions src/containers/Masthead/components/MastheadSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,13 @@ const SearchWrapper = styled("div", {
},
});

const StyledDialogContent = styled(
DialogContent,
{
base: {
display: "flex",
justifyContent: "center",
height: "unset",
},
const StyledDialogContent = styled(DialogContent, {
base: {
display: "flex",
justifyContent: "center",
height: "unset",
},
{ forwardCssProp: true },
);
});

const MastheadSearch = ({ subject }: Props) => {
const [dialogState, setDialogState] = useState({ open: false });
Expand Down
4 changes: 2 additions & 2 deletions src/containers/MyNdla/Arena/ArenaToolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const PostButtons = () => {
setIsOpen(false);
}}
>
<Plus size="nsmall" />
<Plus size="small" />
{t("myNdla.arena.new.topic")}
</StyledSafeLinkButton>
</StyledListItem>
Expand Down Expand Up @@ -89,7 +89,7 @@ export const TopicButtons = () => {
setIsOpen(false);
}}
>
<Plus size="nsmall" />
<Plus size="small" />
{t("myNdla.arena.admin.category.form.newCategory")}
</StyledSafeLinkButton>
</StyledListItem>
Expand Down
2 changes: 1 addition & 1 deletion src/containers/MyNdla/Arena/components/ArenaForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ const ArenaForm = ({ onSave, onAbort, type, initialTitle, initialContent, initia
/>
)}
<InformationLabel>
<StyledInformationOutline size="nsmall" />
<StyledInformationOutline size="small" />
<Text margin="none" textStyle="content">
{t(`myNdla.arena.warning.${type}`)}
</Text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const FavoriteSubjectsPage = () => {
<StyledListItem key="allSubjects">
<StyledSafeLinkButton variant="ghost" colorTheme="lighter" to="/subjects">
{t("subjectsPage.allSubjects")}
<Forward size="nsmall" />
<Forward size="small" />
</StyledSafeLinkButton>
</StyledListItem>
),
Expand All @@ -90,7 +90,7 @@ const FavoriteSubjectsPage = () => {
menuItems={[
{
text: t("subjectsPage.allSubjects"),
icon: <Forward size="nsmall" />,
icon: <Forward size="small" />,
onClick: () => navigate("/subjects"),
},
]}
Expand Down
8 changes: 4 additions & 4 deletions src/containers/MyNdla/Folders/components/FolderButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const FolderButtons = ({ setFocusId, selectedFolder }: FolderButtonProps) => {
});
}}
>
<Cross size="nsmall" />
<Cross size="small" />
{t("myNdla.folder.sharing.button.unShare")}
</StyledButton>
</StyledListItem>
Expand Down Expand Up @@ -157,7 +157,7 @@ const FolderButtons = ({ setFocusId, selectedFolder }: FolderButtonProps) => {
});
}}
>
<Share size="nsmall" />
<Share size="small" />
{t("myNdla.folder.sharing.button.shareShort")}
</StyledButton>
</StyledListItem>
Expand Down Expand Up @@ -210,7 +210,7 @@ const FolderButtons = ({ setFocusId, selectedFolder }: FolderButtonProps) => {
aria-label={t("myNdla.folder.sharing.button.shareLink")}
title={t("myNdla.folder.sharing.button.shareLink")}
>
<Copy size="nsmall" />
<Copy size="small" />
{t("myNdla.folder.sharing.button.shareLink")}
</StyledButton>
</StyledListItem>
Expand All @@ -227,7 +227,7 @@ const FolderButtons = ({ setFocusId, selectedFolder }: FolderButtonProps) => {
aria-label={t("myNdla.folder.sharing.button.goTo")}
title={t("myNdla.folder.sharing.button.goTo")}
>
<ShareArrow size="nsmall" />
<ShareArrow size="small" />
{t("myNdla.folder.sharing.button.goTo")}
</StyledSafeLinkButton>
</StyledListItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const FolderCreateModal = ({ onSaved, parentFolder }: Props) => {
aria-label={t("myNdla.newFolder")}
title={t("myNdla.newFolder")}
>
<Plus size="nsmall" />
<Plus size="small" />
<span>{t("myNdla.newFolderShort")}</span>
</AddButton>
</ModalTrigger>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const FolderDeleteModal = ({ onDelete, onClose }: Props) => {
aria-label={t("myNdla.folder.delete")}
title={t("myNdla.folder.delete")}
>
<TrashCanOutline size="nsmall" />
<TrashCanOutline size="small" />
{t("myNdla.folder.deleteShort")}
</StyledButton>
</ModalTrigger>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const FolderEditModal = ({ folder, onSaved }: Props) => {
aria-label={t("myNdla.folder.edit")}
title={t("myNdla.folder.edit")}
>
<Pencil size="nsmall" />
<Pencil size="small" />
{t("myNdla.folder.editShort")}
</StyledButton>
</ModalTrigger>
Expand Down
2 changes: 1 addition & 1 deletion src/containers/MyNdla/components/NotificationButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ interface BellIconProps {
export const BellIcon = ({ amountOfUnreadNotifications, left }: BellIconProps) => {
return (
<IconWrapper>
<Bell size="nsmall" />
<Bell size="small" />
{amountOfUnreadNotifications !== 0 && (
<NotificationCounter margin="none" element="div" textStyle="meta-text-xsmall" data-left={!!left}>
{amountOfUnreadNotifications > 99 ? "99+" : amountOfUnreadNotifications}
Expand Down
2 changes: 1 addition & 1 deletion src/containers/Resources/ResourceItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ const ResourceItem = ({
)}
{showAdditionalResources && contentTypeDescription && (
<IconWrapper id={contentTypeId} aria-label={contentTypeDescription} title={contentTypeDescription}>
{additional ? <StyledAdditional size="normal" /> : <StyledCore size="normal" />}
{additional ? <StyledAdditional /> : <StyledCore />}
</IconWrapper>
)}
{heartButton?.(path)}
Expand Down
2 changes: 0 additions & 2 deletions src/containers/SearchPage/components/SearchResultItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -227,14 +227,12 @@ const SearchResultItem = ({ item, type }: Props) => {
{context.isAdditional ? (
<Additional
color={colors.brand.dark}
size="normal"
aria-hidden={false}
aria-label={t("resource.tooltipAdditionalTopic")}
/>
) : (
<Core
color={colors.brand.primary}
size="normal"
aria-hidden={false}
aria-label={t("resource.tooltipCoreTopic")}
/>
Expand Down

0 comments on commit cac426a

Please sign in to comment.