-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(progress-stepper): add horizontal width limitation example
- Loading branch information
1 parent
453e7f9
commit a383562
Showing
2 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
packages/components/progress-stepper/examples/ProgressStepperHorizontalWidthLimitation.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import React from 'react'; | ||
import { ProgressStepper } from '@contentful/f36-progress-stepper'; | ||
import { Box, Header } from '@contentful/f36-components'; | ||
import tokens from '@contentful/f36-tokens'; | ||
import { css } from 'emotion'; | ||
|
||
export default function ProgressStepperHorizontalWidthLimitation() { | ||
const styles = { | ||
root: css({ | ||
border: `1px solid ${tokens.gray300}`, | ||
}), | ||
stepperContainer: css({ | ||
padding: `${tokens.spacingS} 0`, | ||
}), | ||
headerContainer: css({ | ||
borderTop: `1px solid ${tokens.gray300}`, | ||
}), | ||
}; | ||
|
||
return ( | ||
<Box className={styles.root}> | ||
<Box className={styles.stepperContainer}> | ||
<ProgressStepper | ||
activeStep={2} | ||
ariaLabel="Horizontal progress stepper width limitation example" | ||
> | ||
<ProgressStepper.Step state="complete" labelText="Label 1" /> | ||
<ProgressStepper.Step state="complete" labelText="Label 2" /> | ||
<ProgressStepper.Step state="active" labelText="Label 3" /> | ||
<ProgressStepper.Step labelText="Label 4" /> | ||
<ProgressStepper.Step labelText="Label 5" /> | ||
</ProgressStepper> | ||
</Box> | ||
<Box className={styles.headerContainer}> | ||
<Header title="Header within the same parent container" /> | ||
</Box> | ||
</Box> | ||
); | ||
} |