-
Notifications
You must be signed in to change notification settings - Fork 376
chore(grid,stack): update examples flags from js to ts #12199
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| import { Grid, GridItem } from '@patternfly/react-core'; | ||
|
|
||
| export const GridAlternativeComponents: React.FunctionComponent = () => ( | ||
| <Grid component="ul"> | ||
| <GridItem component="li">Grid item</GridItem> | ||
| <GridItem component="li">Grid item</GridItem> | ||
| <GridItem component="li">Grid item</GridItem> | ||
| <GridItem component="li">Grid item</GridItem> | ||
| <GridItem component="li">Grid item</GridItem> | ||
| </Grid> | ||
| ); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| import { Grid, GridItem } from '@patternfly/react-core'; | ||
|
|
||
| export const GridBasic: React.FunctionComponent = () => ( | ||
thatblindgeye marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| <Grid> | ||
| <GridItem span={8}>span = 8</GridItem> | ||
| <GridItem span={4} rowSpan={2}> | ||
| span = 4, rowSpan = 2 | ||
| </GridItem> | ||
| <GridItem span={2} rowSpan={3}> | ||
| span = 2, rowSpan = 3 | ||
| </GridItem> | ||
| <GridItem span={2}>span = 2</GridItem> | ||
| <GridItem span={4}>span = 4</GridItem> | ||
| <GridItem span={2}>span = 2</GridItem> | ||
| <GridItem span={2}>span = 2</GridItem> | ||
| <GridItem span={2}>span = 2</GridItem> | ||
| <GridItem span={4}>span = 4</GridItem> | ||
| <GridItem span={2}>span = 2</GridItem> | ||
| <GridItem span={4}>span = 4</GridItem> | ||
| <GridItem span={4}>span = 4</GridItem> | ||
| </Grid> | ||
| ); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| import { Grid, GridItem } from '@patternfly/react-core'; | ||
|
|
||
| export const GridGroupingOrdering: React.FunctionComponent = () => ( | ||
thatblindgeye marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| <Grid hasGutter span={12}> | ||
| <Grid hasGutter span={6} order={{ default: '2' }}> | ||
| <GridItem order={{ default: '3' }}>Set 1, Item A</GridItem> | ||
| <GridItem order={{ default: '1' }}>Set 1, Item B</GridItem> | ||
| <GridItem>Set 1, Item C</GridItem> | ||
| <GridItem order={{ default: '2' }}>Set 1, Item D</GridItem> | ||
| </Grid> | ||
| <Grid hasGutter span={6}> | ||
| <GridItem order={{ default: '2' }}>Set 2, Item A</GridItem> | ||
| <GridItem order={{ default: '1' }}>Set 2, Item B</GridItem> | ||
| <GridItem>Set 2, Item C</GridItem> | ||
| <GridItem order={{ default: '2' }}>Set 2, Item D</GridItem> | ||
| </Grid> | ||
| </Grid> | ||
| ); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| import { Grid, GridItem } from '@patternfly/react-core'; | ||
|
|
||
| export const GridResponsiveOrdering: React.FunctionComponent = () => ( | ||
| <Grid hasGutter span={3}> | ||
| <GridItem order={{ lg: '2' }}>Item A</GridItem> | ||
| <GridItem>Item B</GridItem> | ||
| <GridItem order={{ default: '-1', md: '1' }}>Item C</GridItem> | ||
| </Grid> | ||
| ); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| import { Grid, GridItem } from '@patternfly/react-core'; | ||
|
|
||
| export const GridStandardOrdering: React.FunctionComponent = () => ( | ||
| <Grid hasGutter span={3}> | ||
| <GridItem order={{ default: '2' }}>Item A</GridItem> | ||
| <GridItem>Item B</GridItem> | ||
| <GridItem order={{ default: '-1' }}>Item C</GridItem> | ||
| </Grid> | ||
| ); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| import { Grid, GridItem } from '@patternfly/react-core'; | ||
|
|
||
| export const GridWithGutters: React.FunctionComponent = () => ( | ||
| <Grid hasGutter> | ||
| <GridItem span={8}>span = 8</GridItem> | ||
| <GridItem span={4} rowSpan={2}> | ||
| span = 4, rowSpan = 2 | ||
| </GridItem> | ||
| <GridItem span={2} rowSpan={3}> | ||
| span = 2, rowSpan = 3 | ||
| </GridItem> | ||
| <GridItem span={2}>span = 2</GridItem> | ||
| <GridItem span={4}>span = 4</GridItem> | ||
| <GridItem span={2}>span = 2</GridItem> | ||
| <GridItem span={2}>span = 2</GridItem> | ||
| <GridItem span={2}>span = 2</GridItem> | ||
| <GridItem span={4}>span = 4</GridItem> | ||
| <GridItem span={2}>span = 2</GridItem> | ||
| <GridItem span={4}>span = 4</GridItem> | ||
| <GridItem span={4}>span = 4</GridItem> | ||
| </Grid> | ||
| ); |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,20 @@ | ||||||
| import { Grid, GridItem } from '@patternfly/react-core'; | ||||||
|
|
||||||
| export const GridWithOverrides: React.FunctionComponent = () => ( | ||||||
thatblindgeye marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
| <Grid sm={6} md={4} lg={3} xl2={1}> | ||||||
| <GridItem span={3} rowSpan={2}> | ||||||
| span = 3 rowSpan= 2 | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Inconsistent spacing in text content. The spacing around the equals sign is inconsistent: "span = 3" uses spaces while "rowSpan= 2" is missing a space before the equals sign. 🔎 Proposed fix- span = 3 rowSpan= 2
+ span = 3 rowSpan = 2📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| </GridItem> | ||||||
| <GridItem>Grid Item</GridItem> | ||||||
| <GridItem>Grid Item</GridItem> | ||||||
| <GridItem>Grid Item</GridItem> | ||||||
| <GridItem>Grid Item</GridItem> | ||||||
| <GridItem>Grid Item</GridItem> | ||||||
| <GridItem>Grid Item</GridItem> | ||||||
| <GridItem>Grid Item</GridItem> | ||||||
| <GridItem>Grid Item</GridItem> | ||||||
| <GridItem>Grid Item</GridItem> | ||||||
| <GridItem>Grid Item</GridItem> | ||||||
| <GridItem>Grid Item</GridItem> | ||||||
| </Grid> | ||||||
| ); | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| import { Stack, StackItem } from '@patternfly/react-core'; | ||
|
|
||
| export const StackBasic: React.FunctionComponent = () => ( | ||
| <Stack> | ||
| <StackItem>content</StackItem> | ||
| <StackItem isFilled>pf-m-fill</StackItem> | ||
| <StackItem>content</StackItem> | ||
| </Stack> | ||
| ); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| import { Stack, StackItem } from '@patternfly/react-core'; | ||
|
|
||
| export const StackWithGutter: React.FunctionComponent = () => ( | ||
thatblindgeye marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| <Stack hasGutter> | ||
| <StackItem>content</StackItem> | ||
| <StackItem isFilled>pf-m-fill</StackItem> | ||
| <StackItem>content</StackItem> | ||
| </Stack> | ||
| ); | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra blank line after code fence.
There's an unnecessary blank line (line 43) between the code fence closing and the next section. This is inconsistent with the other examples in the file.
🔎 Proposed fix
```ts file="GridGroupingOrdering.tsx" -🤖 Prompt for AI Agents