Skip to content

Commit

Permalink
docs: update EUI docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mgadewoll committed Jun 5, 2024
1 parent 30b340b commit e56e11c
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
22 changes: 22 additions & 0 deletions packages/eui/src-docs/src/views/steps/steps_example.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ import StepsTitleSizes from './steps_title_sizes';
const stepsTitleSizesSource = require('!!raw-loader!./steps_title_sizes');
const stepsTitleSizesSnippet = '<EuiSteps titleSize="xs" steps={steps} />';

import StepsUnordered from './steps_unordered';
const stepsUnorderedSource = require('!!raw-loader!./steps_unordered');
const stepsUnorderedSnippet = '<EuiSteps titleSize="xxs" steps={steps} />';

export const StepsExample = {
title: 'Steps',
sections: [
Expand Down Expand Up @@ -237,6 +241,24 @@ export const StepsExample = {
demo: <StepsTitleSizes />,
snippet: stepsTitleSizesSnippet,
},
{
title: 'Visually unordered steps',
source: [
{
type: GuideSectionTypes.TSX,
code: stepsUnorderedSource,
},
],
text: (
<p>
You can use <strong>EuiSteps</strong> with visually unordered steps by
setting <EuiCode>titleSize="xxs"</EuiCode>. This will output a step
without number.
</p>
),
demo: <StepsUnordered />,
snippet: stepsUnorderedSnippet,
},
{
title: 'Horizontal steps',
source: [
Expand Down
28 changes: 28 additions & 0 deletions packages/eui/src-docs/src/views/steps/steps_unordered.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import React from 'react';

import { EuiCode, EuiSteps } from '../../../../src/components';

const firstSetOfSteps = [
{
title: 'Step 1',
children: (
<p>
Steps with <EuiCode>titleSize</EuiCode> set to <EuiCode>xxs</EuiCode>{' '}
like this one, get a smaller step circle and have no visual number
indication.
</p>
),
},
{
title: 'Step 2',
children: (
<p>
Steps with <EuiCode>titleSize</EuiCode> set to <EuiCode>xxs</EuiCode>{' '}
like this one, get a smaller step circle and have no visual number
indication.
</p>
),
},
];

export default () => <EuiSteps titleSize="xxs" steps={firstSetOfSteps} />;

0 comments on commit e56e11c

Please sign in to comment.