Skip to content

Commit 8811684

Browse files
André DiastringakrasniqiHotell
authored
Text - Typography wrappers (#18956)
Co-authored-by: Tringa Krasniqi <tkrasniqi@microsoft.com> Co-authored-by: Martin Hochel <Hotell@users.noreply.github.com>
1 parent 9b84c04 commit 8811684

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+445
-26
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { Text } from '@fluentui/react-text';
2+
3+
console.log(Text);
4+
5+
export default {
6+
name: 'Text - Default',
7+
};
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import {
2+
Display,
3+
LargeTitle,
4+
Title1,
5+
Title2,
6+
Title3,
7+
Headline,
8+
Subheadline,
9+
Body,
10+
Caption,
11+
} from '@fluentui/react-text';
12+
13+
console.log(Display, LargeTitle, Title1, Title2, Title3, Headline, Subheadline, Body, Caption);
14+
15+
export default {
16+
name: 'Text - Wrappers',
17+
};

packages/react-text/etc/react-text.api.md

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,51 @@
66

77
import { ComponentPropsCompat } from '@fluentui/react-utilities';
88
import { ComponentStateCompat } from '@fluentui/react-utilities';
9+
import { ForwardRefExoticComponent } from 'react';
910
import { MakeStylesStyleFunctionRule } from '@fluentui/make-styles';
1011
import * as React_2 from 'react';
12+
import { RefAttributes } from 'react';
1113
import { Theme } from '@fluentui/react-theme';
1214

1315
// @public (undocumented)
1416
const body: MakeStylesStyleFunctionRule<Theme>;
1517

18+
// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts
19+
//
20+
// @public
21+
const Body_2: ForwardRefExoticComponent<Props & RefAttributes<HTMLElement>>;
22+
export { Body_2 as Body }
23+
24+
// @public
25+
export const Caption: ForwardRefExoticComponent<Props & RefAttributes<HTMLElement>>;
26+
1627
// @public
1728
const caption: MakeStylesStyleFunctionRule<Theme>;
1829

1930
// @public
20-
export const Display: React_2.ForwardRefExoticComponent<DisplayProps & React_2.RefAttributes<HTMLElement>>;
31+
export const Display: ForwardRefExoticComponent<Props & RefAttributes<HTMLElement>>;
2132

2233
// @public (undocumented)
2334
const display: MakeStylesStyleFunctionRule<Theme>;
2435

2536
// @public
26-
export interface DisplayProps extends Omit<TextProps, 'font' | 'size'> {
27-
}
37+
export const Headline: ForwardRefExoticComponent<Props & RefAttributes<HTMLElement>>;
2838

2939
// @public (undocumented)
3040
const headline: MakeStylesStyleFunctionRule<Theme>;
3141

42+
// @public
43+
export const LargeTitle: ForwardRefExoticComponent<Props & RefAttributes<HTMLElement>>;
44+
3245
// @public (undocumented)
3346
const largeTitle: MakeStylesStyleFunctionRule<Theme>;
3447

3548
// @public
3649
export const renderText: (state: TextState) => JSX.Element;
3750

51+
// @public
52+
export const Subheadline: ForwardRefExoticComponent<Props & RefAttributes<HTMLElement>>;
53+
3854
// @public (undocumented)
3955
const subheadline: MakeStylesStyleFunctionRule<Theme>;
4056

@@ -65,12 +81,21 @@ export interface TextState extends ComponentStateCompat<TextProps, TextDefaulted
6581
ref: React_2.Ref<HTMLElement>;
6682
}
6783

84+
// @public
85+
export const Title1: ForwardRefExoticComponent<Props & RefAttributes<HTMLElement>>;
86+
6887
// @public (undocumented)
6988
const title1: MakeStylesStyleFunctionRule<Theme>;
7089

90+
// @public
91+
export const Title2: ForwardRefExoticComponent<Props & RefAttributes<HTMLElement>>;
92+
7193
// @public (undocumented)
7294
const title2: MakeStylesStyleFunctionRule<Theme>;
7395

96+
// @public
97+
export const Title3: ForwardRefExoticComponent<Props & RefAttributes<HTMLElement>>;
98+
7499
// @public (undocumented)
75100
const title3: MakeStylesStyleFunctionRule<Theme>;
76101

packages/react-text/src/Body.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './components/Body/index';

packages/react-text/src/Caption.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './components/Caption/index';
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './components/Headline/index';
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './components/LargeTitle/index';
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './components/Subheadline/index';
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
1-
import { Display } from './components/Display';
1+
import { Display, LargeTitle, Title1, Title2, Title3, Headline, Subheadline, Body, Caption } from './index';
22
import { FluentProvider } from '@fluentui/react-provider';
33
import { webLightTheme } from '@fluentui/react-theme';
44

55
<Meta title="Components/Text/Wrappers" />
66

77
<FluentProvider theme={webLightTheme}>
88
<Display block>Display text wrapper, semibold, base1000</Display>
9+
<LargeTitle block>LargeTitle text wrapper, semibold, base900</LargeTitle>
10+
<Title1 block>Title1 text wrapper, semibold, base800</Title1>
11+
<Title2 block>Title2 text wrapper, semibold, base700</Title2>
12+
<Title3 block>Title3 text wrapper, semibold, base600</Title3>
13+
<Headline block>Headline text wrapper, semibold, base500</Headline>
14+
<Subheadline block>Subheadline text wrapper, semibold, base400</Subheadline>
15+
<Body block>Body text wrapper, regular, base300</Body>
16+
<Caption block>Caption text wrapper, regular, base200</Caption>
917
</FluentProvider>

packages/react-text/src/Title1.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './components/Title1/index';

0 commit comments

Comments
 (0)