Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove deprecated typography components #1296

Merged
merged 8 commits into from
May 23, 2023
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 9 additions & 9 deletions apps/storybook/src/SkipToContentLink.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import React from 'react';
import {
SkipToContentLink,
SkipToContentLinkProps,
Body,
Text,
Kbd,
Anchor,
} from '@itwin/itwinui-react';
Expand All @@ -25,7 +25,7 @@ export const Basic: Story<SkipToContentLinkProps> = () => {
return (
<>
<SkipToContentLink href='#main-content' />
<Body>
<Text as='p'>
This is not the main content. Press&nbsp;
<Kbd>tab</Kbd>&nbsp;to see skip-to-content-link component. You might
need to click on the top of the page or the URL first. Press&nbsp;
Expand All @@ -36,7 +36,7 @@ export const Basic: Story<SkipToContentLinkProps> = () => {
Note that because of constraints with storybook, the link will open a
new tab.
</em>
</Body>
</Text>
<div
style={{
border: 'solid 1px var(--iui-color-background-border)',
Expand All @@ -45,12 +45,12 @@ export const Basic: Story<SkipToContentLinkProps> = () => {
}}
id='main-content'
>
<Body>
<Text as='p'>
This is the main content. Focus will be directed here from the
skip-to-content-link component.&nbsp;
<Anchor href='#'>Tab again to focus on this link.</Anchor>
&nbsp;
</Body>
</Text>
</div>
</>
);
Expand All @@ -62,7 +62,7 @@ export const CustomText: Story<SkipToContentLinkProps> = () => {
<SkipToContentLink href='#main-content'>
Skip to main content (translated)
</SkipToContentLink>
<Body>
<Text as='p'>
This is not the main content. Press&nbsp;
<Kbd>tab</Kbd>&nbsp;to see skip-to-content-link component. You might
need to click on the top of the page or the URL first. Press&nbsp;
Expand All @@ -73,7 +73,7 @@ export const CustomText: Story<SkipToContentLinkProps> = () => {
Note that because of constraints with storybook, the link will open a
new tab.
</em>
</Body>
</Text>
<div
style={{
border: 'solid 1px var(--iui-color-background-border)',
Expand All @@ -82,12 +82,12 @@ export const CustomText: Story<SkipToContentLinkProps> = () => {
}}
id='main-content'
>
<Body>
<Text as='p'>
This is the main content. Focus will be directed here from the
skip-to-content-link component.&nbsp;
<Anchor href='#'>Tab again to focus on this link.</Anchor>
&nbsp;
</Body>
</Text>
</div>
</>
);
Expand Down
7 changes: 4 additions & 3 deletions apps/storybook/src/Slider.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import { Meta, Story } from '@storybook/react';
import React from 'react';
import { useMemo, useCallback, useState } from '@storybook/addons';
import { Body, Slider, SliderProps } from '@itwin/itwinui-react';
import { Text, Slider, SliderProps } from '@itwin/itwinui-react';
import SvgSmileyHappy from '@itwin/itwinui-icons-react/cjs/icons/SmileyHappy';
import SvgSmileySad from '@itwin/itwinui-icons-react/cjs/icons/SmileySad';

Expand Down Expand Up @@ -179,14 +179,15 @@ export const CustomTickNoTooltip: Story<SliderProps> = (args) => {
marginTop: '20px',
}}
>
<Body
<Text
as='p'
style={{
width: '60px',
marginRight: '6px',
}}
>
{dateFormatter.format(currentDate)}
</Body>
</Text>
</div>
}
/>
Expand Down
10 changes: 5 additions & 5 deletions apps/storybook/src/Table.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
MenuItem,
IconButton,
Table,
Leading,
Text,
tableFilters,
TableFilterValue,
TableProps,
Expand Down Expand Up @@ -697,7 +697,7 @@ export const Expandable: Story<Partial<TableProps>> = (args) => {
const expandedSubComponent = useCallback(
(row: Row) => (
<div style={{ padding: 16 }}>
<Leading>Extra information</Leading>
<Text variant='leading'>Extra information</Text>
<pre>
<code>{JSON.stringify({ values: row.values }, null, 2)}</code>
</pre>
Expand Down Expand Up @@ -1102,7 +1102,7 @@ export const DisabledRows: Story<Partial<TableProps>> = (args) => {
const expandedSubComponent = useCallback(
(row: Row) => (
<div style={{ padding: 16 }}>
<Leading>Extra information</Leading>
<Text variant='leading'>Extra information</Text>
<pre>
<code>{JSON.stringify({ values: row.values }, null, 2)}</code>
</pre>
Expand Down Expand Up @@ -1491,7 +1491,7 @@ export const Full: Story<Partial<TableProps>> = (args) => {
const expandedSubComponent = useCallback(
(row: Row) => (
<div style={{ padding: 16 }}>
<Leading>Extra information</Leading>
<Text variant='leading'>Extra information</Text>
<pre>
<code>{JSON.stringify({ values: row.values }, null, 2)}</code>
</pre>
Expand Down Expand Up @@ -3458,7 +3458,7 @@ export const CustomizedColumns: Story<Partial<TableProps>> = (args) => {
const subComponent = useCallback(
(row: Row) => (
<div style={{ padding: 16 }}>
<Leading>Extra information</Leading>
<Text variant='leading'>Extra information</Text>
<pre>
<code>{JSON.stringify({ values: row.values }, null, 2)}</code>
</pre>
Expand Down
2 changes: 1 addition & 1 deletion apps/website/src/pages/docs/anchor.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Anchor
description: The anchor component creates a hyperlink targeting a specific location within the same page or a different one.
layout: ./_layout.astro
propsPath: '@itwin/itwinui-react/src/core/Typography/Body/Body.tsx'
propsPath: '@itwin/itwinui-react/esm/core/Typography/Anchor/Anchor.d.ts'
group: typography
thumbnail: Anchor
---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const EXPANDER_CELL_ID = 'iui-table-expander';
* const subComponent = useCallback(
* (row: Row) => (
* <div style={{ padding: 16 }}>
* <Leading>Extra information</Leading>
* <Text variant='leading'>Extra information</Text>
* <pre>
* <code>{JSON.stringify({ values: row.values }, null, 2)}</code>
* </pre>
Expand Down
55 changes: 0 additions & 55 deletions packages/itwinui-react/src/core/Typography/Body/Body.tsx

This file was deleted.

7 changes: 0 additions & 7 deletions packages/itwinui-react/src/core/Typography/Body/index.ts

This file was deleted.

44 changes: 0 additions & 44 deletions packages/itwinui-react/src/core/Typography/Headline/Headline.tsx

This file was deleted.

7 changes: 0 additions & 7 deletions packages/itwinui-react/src/core/Typography/Headline/index.ts

This file was deleted.

44 changes: 0 additions & 44 deletions packages/itwinui-react/src/core/Typography/Leading/Leading.tsx

This file was deleted.

7 changes: 0 additions & 7 deletions packages/itwinui-react/src/core/Typography/Leading/index.ts

This file was deleted.

43 changes: 0 additions & 43 deletions packages/itwinui-react/src/core/Typography/Small/Small.tsx

This file was deleted.

7 changes: 0 additions & 7 deletions packages/itwinui-react/src/core/Typography/Small/index.ts

This file was deleted.