Skip to content

Commit

Permalink
refactor: replace deprecated weak prop for secondary in text usages (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
martimalek authored Sep 20, 2023
1 parent 205bb36 commit 8efebf7
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 27 deletions.
28 changes: 16 additions & 12 deletions src/components/FilePicker/FilePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,17 @@ const Outliner = styled(Box)<OutlinerProps>`
${({ hasValidFile }) =>
hasValidFile &&
css`
${MediaQueries.medium} {
&:hover {
background-color: ${Colors.ACTION_BLUE_50};
border-color: ${Colors.ACTION_BLUE_50};
svg:not([color='${Colors.POSITIVE_GREEN_900}']) path {
fill: ${Colors.ACTION_BLUE_900};
}
${MediaQueries.medium} {
&:hover {
background-color: ${Colors.ACTION_BLUE_50};
border-color: ${Colors.ACTION_BLUE_50};
svg:not([color='${Colors.POSITIVE_GREEN_900}']) path {
fill: ${Colors.ACTION_BLUE_900};
}
}
`}
}
`}
`;

const Input = styled.input`
Expand Down Expand Up @@ -190,7 +190,7 @@ const FilePicker: FC<FilePickerProps> = ({
<Text as="label" htmlFor={name} fontSize={1}>
{label}
</Text>
<Text weak fontSize={1}>
<Text secondary fontSize={1}>
{file && shrinkFileName(file)}
</Text>
</Box>
Expand All @@ -204,9 +204,13 @@ const FilePicker: FC<FilePickerProps> = ({
)}
</Box>
<Box display={{ _: 'flex', medium: 'none' }} alignItems="top">
{!alwaysShowActionButton && validFileSelected ? <CheckCircleOutlineIcon color={ICON_FILE_FEEDBACK_COLOR} /> : <ShareIcon />}
{!alwaysShowActionButton && validFileSelected ? (
<CheckCircleOutlineIcon color={ICON_FILE_FEEDBACK_COLOR} />
) : (
<ShareIcon />
)}
</Box>
</Outliner>
</Outliner>
</Box>
);
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/Modal/docs/ModalCreator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Modal } from '../Modal';
export const modalContent = (dismiss: () => void): React.ReactElement => (
<>
<Headline as="h2">Add Note</Headline>
<Text as="p" weak my={3}>
<Text as="p" secondary my={3}>
Please keep in mind that comments are also read by other agents. Make sure to write comprehensible text.
</Text>
<Button onClick={dismiss}>Add Note</Button>
Expand Down
8 changes: 4 additions & 4 deletions src/components/Pagination/docs/PaginationProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ const NormalPagination: React.FC = () => (
pageSize={pageSize}
totalItems={totalItems}
label={
<Text weak>
<Text secondary>
Page{' '}
<Text as="b" fontWeight="semibold" weak>
<Text as="b" fontWeight="semibold" secondary>
{currentPage} of {Math.ceil(totalItems / pageSize)}
</Text>
</Text>
Expand Down Expand Up @@ -122,9 +122,9 @@ const PaginationWithPageSize: React.FC = () => (
pageSizes={pageSizes}
totalItems={totalItems}
label={
<Text weak>
<Text secondary>
Page{' '}
<Text as="b" fontWeight="semibold" weak>
<Text as="b" fontWeight="semibold" secondary>
{currentPage} of {Math.ceil(totalItems / pageSize)}
</Text>
</Text>
Expand Down
10 changes: 5 additions & 5 deletions src/components/Table/docs/ComplexDataTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ export const ComplexDataTable: FC = () => (
<TableCell>
Große Elbstraße 273
<br />
<Text fontSize={1} weak>
<Text fontSize={1} secondary>
22767 Hamburg
</Text>
</TableCell>
<TableCell>
Holsteiner Chaussee 191
<br />
<Text fontSize={1} weak>
<Text fontSize={1} secondary>
22457 Hamburg
</Text>
</TableCell>
Expand Down Expand Up @@ -73,7 +73,7 @@ export const ComplexDataTable: FC = () => (
<TableCell>
Große Elbstraße 273
<br />
<Text fontSize={1} weak>
<Text fontSize={1} secondary>
22767 Hamburg
</Text>
</TableCell>
Expand All @@ -95,14 +95,14 @@ export const ComplexDataTable: FC = () => (
<TableCell>
Große Elbstraße 273
<br />
<Text fontSize={1} weak>
<Text fontSize={1} secondary>
22767 Hamburg
</Text>
</TableCell>
<TableCell>
Große Elbstraße 273
<br />
<Text fontSize={1} weak>
<Text fontSize={1} secondary>
22767 Hamburg
</Text>
</TableCell>
Expand Down
6 changes: 3 additions & 3 deletions src/components/Table/docs/DefaultTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const DefaultTable: FC = (args: TableProps) => (
<TableCell>
5 July 2019 - 11:14
<br />
<Text fontSize={0} weak>
<Text fontSize={0} secondary>
No activity yet
</Text>
</TableCell>
Expand Down Expand Up @@ -53,7 +53,7 @@ export const DefaultTable: FC = (args: TableProps) => (
<TableCell>
27 February 2020 - 16:02
<br />
<Text fontSize={0} weak>
<Text fontSize={0} secondary>
17 Tours
</Text>
</TableCell>
Expand Down Expand Up @@ -83,7 +83,7 @@ export const DefaultTable: FC = (args: TableProps) => (
<TableCell>
30 March 2020 - 18:19
<br />
<Text fontSize={0} weak>
<Text fontSize={0} secondary>
17 Tours
</Text>
</TableCell>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Table/docs/SkeletonTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const SkeletonTable: FC = () => {
<TableCell>
{entry.date}
<br />
<Text fontSize={0} weak>
<Text fontSize={0} secondary>
{entry.activity}
</Text>
</TableCell>
Expand Down
2 changes: 1 addition & 1 deletion src/essentials/Spaces/docs/SpacesContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const SpacesContainer: React.FC = () => (
<Text mt={1} fontSize={1} style={{ color: 'inherit' }}>
{space}
</Text>
<Text mb={2} fontSize={1} weak>
<Text mb={2} fontSize={1} secondary>
{Number(space.replace('rem', '')) * 16}px
</Text>
<SpaceSquare space={Spaces[index]} />
Expand Down

0 comments on commit 8efebf7

Please sign in to comment.