From efe8050dc2fcf282429106c11ab2a11d5b048837 Mon Sep 17 00:00:00 2001 From: Brigette Lundeen Date: Thu, 6 Sep 2018 15:14:42 -0700 Subject: [PATCH 1/4] fixing shorthand/children doc view for font sizes & font weights --- .../Text/Types/TextSizesExample.shorthand.tsx | 16 ++++++------- .../Text/Types/TextSizesExample.tsx | 23 +++++++++++++++++++ .../Types/TextWeightsExample.shorthand.tsx | 10 ++++---- .../Text/Types/TextWeightsExample.tsx | 17 ++++++++++++++ 4 files changed, 53 insertions(+), 13 deletions(-) create mode 100644 docs/src/examples/components/Text/Types/TextSizesExample.tsx create mode 100644 docs/src/examples/components/Text/Types/TextWeightsExample.tsx diff --git a/docs/src/examples/components/Text/Types/TextSizesExample.shorthand.tsx b/docs/src/examples/components/Text/Types/TextSizesExample.shorthand.tsx index 4e24b546d4..8235130e61 100644 --- a/docs/src/examples/components/Text/Types/TextSizesExample.shorthand.tsx +++ b/docs/src/examples/components/Text/Types/TextSizesExample.shorthand.tsx @@ -3,21 +3,21 @@ import { Text } from '@stardust-ui/react' const TextSizesExampleShorthand = () => (
- Dicta voluptatum dolorem. +
- Dicta voluptatum dolorem. +
- Dicta voluptatum dolorem. +
- Dicta voluptatum dolorem. +
- Dicta voluptatum dolorem. +
- Dicta voluptatum dolorem. +
- Dicta voluptatum dolorem. +
- Dicta voluptatum dolorem. +
) export default TextSizesExampleShorthand diff --git a/docs/src/examples/components/Text/Types/TextSizesExample.tsx b/docs/src/examples/components/Text/Types/TextSizesExample.tsx new file mode 100644 index 0000000000..3598e24f42 --- /dev/null +++ b/docs/src/examples/components/Text/Types/TextSizesExample.tsx @@ -0,0 +1,23 @@ +import React from 'react' +import { Text } from '@stardust-ui/react' + +const TextSizesExample = () => ( +
+ Dicta voluptatum dolorem. +
+ Dicta voluptatum dolorem. +
+ Dicta voluptatum dolorem. +
+ Dicta voluptatum dolorem. +
+ Dicta voluptatum dolorem. +
+ Dicta voluptatum dolorem. +
+ Dicta voluptatum dolorem. +
+ Dicta voluptatum dolorem. +
+) +export default TextSizesExample diff --git a/docs/src/examples/components/Text/Types/TextWeightsExample.shorthand.tsx b/docs/src/examples/components/Text/Types/TextWeightsExample.shorthand.tsx index 88743f8349..f0d049762a 100644 --- a/docs/src/examples/components/Text/Types/TextWeightsExample.shorthand.tsx +++ b/docs/src/examples/components/Text/Types/TextWeightsExample.shorthand.tsx @@ -3,15 +3,15 @@ import { Text } from '@stardust-ui/react' const TextWeightsExampleShorthand = () => (
- This text is light. +
- This text is semilight. +
- This text is regular. +
- This text is semibold. +
- This text is bold. +
) export default TextWeightsExampleShorthand diff --git a/docs/src/examples/components/Text/Types/TextWeightsExample.tsx b/docs/src/examples/components/Text/Types/TextWeightsExample.tsx new file mode 100644 index 0000000000..8059d35902 --- /dev/null +++ b/docs/src/examples/components/Text/Types/TextWeightsExample.tsx @@ -0,0 +1,17 @@ +import React from 'react' +import { Text } from '@stardust-ui/react' + +const TextWeightsExample = () => ( +
+ This text is light. +
+ This text is semilight. +
+ This text is regular. +
+ This text is semibold. +
+ This text is bold. +
+) +export default TextWeightsExample From 531cf7f6391d82b3f1af6bc6599204834f6761e9 Mon Sep 17 00:00:00 2001 From: Brigette Lundeen Date: Thu, 6 Sep 2018 22:01:08 -0700 Subject: [PATCH 2/4] adding shorthand for other text variants --- .../Text/States/TextExampleDisabled.shorthand.tsx | 8 ++++++++ .../components/Text/States/TextExampleError.shorthand.tsx | 6 ++++++ .../Text/States/TextExampleSuccess.shorthand.tsx | 8 ++++++++ .../Text/Variations/TextExampleAtMention.shorthand.tsx | 6 ++++++ .../Text/Variations/TextExampleTimestamp.shorthand.tsx | 8 ++++++++ 5 files changed, 36 insertions(+) create mode 100644 docs/src/examples/components/Text/States/TextExampleDisabled.shorthand.tsx create mode 100644 docs/src/examples/components/Text/States/TextExampleError.shorthand.tsx create mode 100644 docs/src/examples/components/Text/States/TextExampleSuccess.shorthand.tsx create mode 100644 docs/src/examples/components/Text/Variations/TextExampleAtMention.shorthand.tsx create mode 100644 docs/src/examples/components/Text/Variations/TextExampleTimestamp.shorthand.tsx diff --git a/docs/src/examples/components/Text/States/TextExampleDisabled.shorthand.tsx b/docs/src/examples/components/Text/States/TextExampleDisabled.shorthand.tsx new file mode 100644 index 0000000000..85275c7366 --- /dev/null +++ b/docs/src/examples/components/Text/States/TextExampleDisabled.shorthand.tsx @@ -0,0 +1,8 @@ +import React from 'react' +import { Text } from '@stardust-ui/react' + +const TextExampleDisabledShorthand = () => ( + +) + +export default TextExampleDisabledShorthand diff --git a/docs/src/examples/components/Text/States/TextExampleError.shorthand.tsx b/docs/src/examples/components/Text/States/TextExampleError.shorthand.tsx new file mode 100644 index 0000000000..10a35dd38d --- /dev/null +++ b/docs/src/examples/components/Text/States/TextExampleError.shorthand.tsx @@ -0,0 +1,6 @@ +import React from 'react' +import { Text } from '@stardust-ui/react' + +const TextExampleErrorShorthand = () => + +export default TextExampleErrorShorthand diff --git a/docs/src/examples/components/Text/States/TextExampleSuccess.shorthand.tsx b/docs/src/examples/components/Text/States/TextExampleSuccess.shorthand.tsx new file mode 100644 index 0000000000..046eeeef30 --- /dev/null +++ b/docs/src/examples/components/Text/States/TextExampleSuccess.shorthand.tsx @@ -0,0 +1,8 @@ +import React from 'react' +import { Text } from '@stardust-ui/react' + +const TextExampleSuccessShorthand = () => ( + +) + +export default TextExampleSuccessShorthand diff --git a/docs/src/examples/components/Text/Variations/TextExampleAtMention.shorthand.tsx b/docs/src/examples/components/Text/Variations/TextExampleAtMention.shorthand.tsx new file mode 100644 index 0000000000..1260064467 --- /dev/null +++ b/docs/src/examples/components/Text/Variations/TextExampleAtMention.shorthand.tsx @@ -0,0 +1,6 @@ +import React from 'react' +import { Text } from '@stardust-ui/react' + +const TextExampleAtMentionShorthand = () => + +export default TextExampleAtMentionShorthand diff --git a/docs/src/examples/components/Text/Variations/TextExampleTimestamp.shorthand.tsx b/docs/src/examples/components/Text/Variations/TextExampleTimestamp.shorthand.tsx new file mode 100644 index 0000000000..af36508bff --- /dev/null +++ b/docs/src/examples/components/Text/Variations/TextExampleTimestamp.shorthand.tsx @@ -0,0 +1,8 @@ +import React from 'react' +import { Text } from '@stardust-ui/react' + +const TextExampleTimestampShorthand = () => ( + +) + +export default TextExampleTimestampShorthand From 8b28f39cde2fc33a917b5fb47251eb5227c26b8d Mon Sep 17 00:00:00 2001 From: Brigette Lundeen Date: Thu, 6 Sep 2018 22:59:49 -0700 Subject: [PATCH 3/4] adding accessibility content --- src/components/Text/Text.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/Text/Text.tsx b/src/components/Text/Text.tsx index 3499fb969a..15793cfded 100644 --- a/src/components/Text/Text.tsx +++ b/src/components/Text/Text.tsx @@ -26,6 +26,9 @@ export interface ITextProps { /** * A component containing text + * @accessibility + * Text is how people read the content on your website. + * Ensure that a contrast ratio of at least 4.5:1 exists between text and the background behind the text. */ class Text extends UIComponent, any> { static className = 'ui-text' From 3be61415c0510b3b29c2559041554cdaa273ab84 Mon Sep 17 00:00:00 2001 From: kuzhelov Date: Fri, 7 Sep 2018 13:30:57 +0200 Subject: [PATCH 4/4] update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e38d5cf54..3fbedfb517 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - Correct Teams theme site variables @sergiorv ([#110](https://github.com/stardust-ui/react/pull/110)) - Fixed missing colors in Teams' siteVariables @mnajdova ([#200](https://github.com/stardust-ui/react/pull/200)) - Fixed Teams' siteVariables font sizes @levithomason ([#204](https://github.com/stardust-ui/react/pull/204)) +- Fixed docs examples of `Text` component @codepretty ([#205](https://github.com/stardust-ui/react/pull/205)) ### Features - Add `state` to `props` in component styling functions @Bugaa92 ([#173](https://github.com/stardust-ui/react/pull/173)) @@ -31,6 +32,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - Add `ButtonGroup` component @mnajdova ([#179](https://github.com/stardust-ui/react/pull/179)) - Add Button `text` prop @mnajdova ([#177](https://github.com/stardust-ui/react/pull/177)) - Add accessibility keyboard action handlers @sophieH29 ([#121](https://github.com/stardust-ui/react/pull/121)) +- Add accessibility description for `Text` component @codepretty ([#205](https://github.com/stardust-ui/react/pull/205)) ## [v0.5.0](https://github.com/stardust-ui/react/tree/v0.5.0) (2018-08-30)