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

[Emotion] Convert EuiSteps #6555

Merged
merged 25 commits into from
Feb 14, 2023
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
3dfa45d
Initial conversion
elizabetdev Jan 26, 2023
eb56617
WIP
elizabetdev Jan 30, 2023
333dc1d
Align title
elizabetdev Jan 30, 2023
9baca6d
Add CL
elizabetdev Jan 31, 2023
ff203c8
Add `shouldRenderCustomStyles()`
elizabetdev Jan 31, 2023
49ebc91
Removed unused class `euiStepNumber__icon`
elizabetdev Jan 31, 2023
f8f6e54
Merge remote-tracking branch 'upstream/main' into step-title-alignment
elizabetdev Feb 9, 2023
731e42e
Reusing button bgs and colors
elizabetdev Feb 9, 2023
9957df9
Rename examples to `.tsx`
elizabetdev Feb 9, 2023
8cd48f3
Removed unused services
elizabetdev Feb 9, 2023
e4f32b2
Merge remote-tracking branch 'upstream/main' into step-title-alignment
elizabetdev Feb 13, 2023
8fc8eff
Fix small title padding top
elizabetdev Feb 13, 2023
ee27e51
Avoid passing `isSmall` prop
elizabetdev Feb 13, 2023
3376cec
Improve `linearGradient` to use variables
elizabetdev Feb 13, 2023
21f484d
Avoid passing `isDisabled` as a style prop
elizabetdev Feb 13, 2023
06f6ab0
Update changelog
cee-chen Feb 13, 2023
c869f25
[PR feedback] destructure euiTheme + simplify euiStepVariables
cee-chen Feb 13, 2023
94772fb
[PR feedback] Clean up `step.styles.ts`
cee-chen Feb 13, 2023
7fde6cb
Clean up horizontal step styles
cee-chen Feb 13, 2023
cd9d12b
Prefer using theme variables over static `2px` width
cee-chen Feb 14, 2023
5026fd5
Clean up EuiStepNumber styles
cee-chen Feb 14, 2023
7eb1ac8
Clean up unnecessary status vars with a map instead
cee-chen Feb 14, 2023
8ac53e8
[nit] grammar
cee-chen Feb 14, 2023
6fa6ce5
Misc docs cleanup
cee-chen Feb 14, 2023
f2ea3c8
Removed unnecessary shadow on current numbers and changed font-weight…
elizabetdev Feb 14, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
import React, { useState, Fragment } from 'react';

import { EuiSpacer, EuiSteps, EuiButton } from '../../../../src/components';
import {
EuiSpacer,
EuiSteps,
EuiStepStatus,
EuiButton,
EuiFlexGroup,
EuiFlexItem,
} from '../../../../src/components';

export default () => {
const [status, setStatus] = useState('incomplete');
const [status, setStatus] = useState<EuiStepStatus>('incomplete');

let completeButton;
if (status !== 'complete') {
Expand Down Expand Up @@ -59,7 +66,16 @@ export default () => {
<Fragment>
<p>We are fancy buttons just waiting to be pushed!</p>
<EuiSpacer />
{completeButton} {warningButton} {dangerButton}
<EuiFlexGroup
gutterSize="s"
alignItems="center"
responsive={false}
wrap
>
<EuiFlexItem grow={false}> {completeButton} </EuiFlexItem>
<EuiFlexItem grow={false}> {warningButton} </EuiFlexItem>
<EuiFlexItem grow={false}> {dangerButton} </EuiFlexItem>
</EuiFlexGroup>
</Fragment>
),
status: status,
Expand Down
12 changes: 6 additions & 6 deletions src-docs/src/views/steps/steps_example.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export const StepsExample = {
{
source: [
{
type: GuideSectionTypes.JS,
type: GuideSectionTypes.TSX,
code: stepsSource,
},
],
Expand All @@ -152,7 +152,7 @@ export const StepsExample = {
title: 'Complex steps',
source: [
{
type: GuideSectionTypes.JS,
type: GuideSectionTypes.TSX,
code: stepsComplexSource,
},
],
Expand All @@ -171,7 +171,7 @@ export const StepsExample = {
title: 'Heading elements',
source: [
{
type: GuideSectionTypes.JS,
type: GuideSectionTypes.TSX,
code: headingElementStepsSource,
},
],
Expand All @@ -198,7 +198,7 @@ export const StepsExample = {
title: 'Steps status',
source: [
{
type: GuideSectionTypes.JS,
type: GuideSectionTypes.TSX,
code: statusSource,
},
],
Expand All @@ -220,7 +220,7 @@ export const StepsExample = {
title: 'Custom title sizes',
source: [
{
type: GuideSectionTypes.JS,
type: GuideSectionTypes.TSX,
code: stepsTitleSizesSource,
},
],
Expand All @@ -243,7 +243,7 @@ export const StepsExample = {
title: 'Horizontal steps',
source: [
{
type: GuideSectionTypes.JS,
type: GuideSectionTypes.TSX,
code: stepsHorizontalSource,
},
],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import React from 'react';

import { EuiStepsHorizontal } from '../../../../src/components';
import {
EuiStepsHorizontal,
EuiStepsHorizontalProps,
} from '../../../../src/components';

const horizontalSteps = [
const horizontalSteps: EuiStepsHorizontalProps['steps'] = [
{
title: 'Completed step 1',
status: 'complete',
Expand Down
1 change: 0 additions & 1 deletion src/components/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,5 @@
@import 'side_nav/index';
@import 'search_bar/index';
@import 'selectable/index';
@import 'steps/index';
@import 'suggest/index';
@import 'table/index';
Loading