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

docs: Fix miscellaneous content issues with MDX docs #1304

Merged
merged 8 commits into from
Oct 7, 2021
Merged
Show file tree
Hide file tree
Changes from all 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
20 changes: 10 additions & 10 deletions cypress/integration/Radio.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,26 @@ describe('Radio', () => {
cy.checkA11y();
});

context(`when the "Gluten Free" radio button is clicked`, () => {
context(`when the "Gluten free" radio button is clicked`, () => {
beforeEach(() => {
cy.findByLabelText('Gluten Free').click();
cy.findByLabelText('Gluten free').click();
});

it(`the "Gluten Free" radio button should be checked`, () => {
cy.findByLabelText('Gluten Free').should('be.checked');
it(`the "Gluten free" radio button should be checked`, () => {
cy.findByLabelText('Gluten free').should('be.checked');
});
});

context(
`when clicking the "Gluten Free" radio button and then clicking the "Thin" radio button`,
`when clicking the "Gluten free" radio button and then clicking the "Thin" radio button`,
() => {
beforeEach(() => {
cy.findByLabelText('Gluten Free').click();
cy.findByLabelText('Gluten free').click();
cy.findByLabelText('Thin').click();
});

it(`the "Gluten Free" radio button should not be checked`, () => {
cy.findByLabelText('Gluten Free').should('not.be.checked');
it(`the "Gluten free" radio button should not be checked`, () => {
cy.findByLabelText('Gluten free').should('not.be.checked');
});

it(`the "Thin" radio button should be checked`, () => {
Expand All @@ -53,8 +53,8 @@ describe('Radio', () => {
cy.checkA11y();
});

it(`the "Gluten Free (Sold Out)" radio button should be disabled`, () => {
cy.findByLabelText('Gluten Free (Sold Out)').should('be.disabled');
it(`the "Gluten free (sold out)" radio button should be disabled`, () => {
cy.findByLabelText('Gluten free (sold out)').should('be.disabled');
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ you'll need to add `buttonAriaLabel` to `Breadcrumbs.CollapsibleList`.

<ExampleCodeBlock code={CollapsibleList} />

### Right-to-Left Example
### Right-to-Left (RTL)

Breadcrumbs has bidirectional support out of the box. That means outside of setting the content
direction in your application's Canvas theme, you don't need to do anything else to make it work.
Expand Down
2 changes: 1 addition & 1 deletion modules/preview-react/menu/stories/examples/Icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {Menu, MenuItem} from '@workday/canvas-kit-preview-react/menu';

export const Icons = () => {
return (
<Menu title="Menu Title">
<Menu>
<MenuItem icon={uploadCloudIcon}>First Item</MenuItem>
<MenuItem icon={setupIcon}>Second Item (with a really really really long label)</MenuItem>
<MenuItem isDisabled icon={uploadCloudIcon} secondaryIcon={taskContactIcon}>
Expand Down
2 changes: 1 addition & 1 deletion modules/preview-react/menu/stories/examples/ManyItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {Menu, MenuItem} from '@workday/canvas-kit-preview-react/menu';

export const ManyItems = () => {
return (
<Menu title="Menu Titles">
<Menu>
{'One Two Three Four Five Six Seven Eight Nine Ten Eleven Twelve Thirteen Fourteen Fifteen'
.split(' ')
.map(item => {
Expand Down
2 changes: 1 addition & 1 deletion modules/react/action-bar/stories/ActionBar.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@ At 575px, responsive styles will take effect:

## Props

Undocumented props are spread to the underlying container `div` element.
Undocumented props are spread to the underlying container `<div>` element.

<ArgsTable of={ActionBar} />
14 changes: 7 additions & 7 deletions modules/react/button/stories/button/Button.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ should take. Not all screens require a Primary Button.

#### Props

Undocumented props are spread to the underlying `button` element.
Undocumented props are spread to the underlying `<button>` element.

<ArgsTable of={PrimaryButton} />

Expand All @@ -58,7 +58,7 @@ Use the `inverse` variants on dark or colorful backgrounds.

#### Props

Undocumented props are spread to the underlying `button` element.
Undocumented props are spread to the underlying `<button>` element.

<ArgsTable of={SecondaryButton} />

Expand All @@ -75,7 +75,7 @@ Use the `inverse` variants on dark or colorful backgrounds.

#### Props

Undocumented props are spread to the underlying `button` element.
Undocumented props are spread to the underlying `<button>` element.

<ArgsTable of={TertiaryButton} />

Expand All @@ -89,16 +89,16 @@ before deleting.

#### Props

Undocumented props are spread to the underlying `button` element.
Undocumented props are spread to the underlying `<button>` element.

<ArgsTable of={DeleteButton} />

### Accessible Use of the `as` Prop

Like many of our components, Buttons accept an `as` prop, which lets you change the underlying
semantic element - usually an `a` (anchor), or a `button`. This should be done with caution to
ensure the best accessibility. Generally, `button` elements should be used for actions, and `a`
(anchor) elements should be used for navigation.
semantic element - usually an `<a>`, or a `<button>`. This should be done with caution to ensure the
best accessibility. Generally, `<button>` elements should be used for actions, and `<a>` elements
should be used for navigation.

## Specifications

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,6 @@ The `toggle` prop can be used to make icon buttons toggleable.

## Props

Undocumented props are spread to the underlying `button` element.
Undocumented props are spread to the underlying `<button>` element.

<ArgsTable of={IconButton} />
8 changes: 5 additions & 3 deletions modules/react/pagination/stories/pagination.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ import {
# Canvas Kit Pagination

`Pagination` is a
[compound component](/getting-started/for-developers/resources/compound-components/) for handling
navigation between pages in a range.
[compound component](/getting-started/for-developers/resources/compound-components/) that allows
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Subtle touch up here, I like it.

users to navigate between pages in a range.

[> Workday Design Reference](https://design.workday.com/components/navigation/pagination)

## Installation

Expand Down Expand Up @@ -81,7 +83,7 @@ the range.

### Right-to-Left (RTL)

This example shows how the component supports right-to-left languages.
`Pagination` supports right-to-left languages when specified in the `CanvasProvider` `theme`.

<ExampleCodeBlock code={RTL} />

Expand Down