-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: merge branch 'main' into align-to-react18
- Loading branch information
Showing
19 changed files
with
244 additions
and
36 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
## [8.17.0](https://github.com/AxisCommunications/fluent-components/compare/38eb6078d96f18c71c51a22f52961daa9062e015..140904fbfd3c56bde08d14c6f33968552e227e77) (2024-03-05T10:45:19.659Z) | ||
## [8.18.0](https://github.com/AxisCommunications/fluent-components/compare/f5b6b274dacd01e30374f6e1a60798b9a411f511..703ba4dbf8a00c1b6791ee548753cd9a94b1bf47) (2024-03-14T14:05:47.206Z) | ||
|
||
### 🐛 Bug fixes | ||
### 🚧 Maintenance | ||
|
||
- **topbar**: use correct my systems icon (#220) ([140904f](https://github.com/AxisCommunications/fluent-components/commit/140904fbfd3c56bde08d14c6f33968552e227e77)) | ||
- add classNames for stepper part (#224) ([703ba4d](https://github.com/AxisCommunications/fluent-components/commit/703ba4dbf8a00c1b6791ee548753cd9a94b1bf47)) | ||
- bump react in examples (#223) ([5dc135a](https://github.com/AxisCommunications/fluent-components/commit/5dc135a550c835b2f026bcd3871db469a5cbd004)) |
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
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
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
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
export { Stepper } from "./stepper"; | ||
export { StepperDialog } from "./stepper-dialog"; | ||
export { StepperDialogClassNames } from "./stepper-dialog.styles"; | ||
export type { DialogStep, StepperDialogProps } from "./stepper-dialog.types"; | ||
export type { Step, StepperProps } from "./stepper.types"; |
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
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
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
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
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
109 changes: 109 additions & 0 deletions
109
examples/src/stories/stepper/examples/custom-style-example.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,109 @@ | ||
import React, { useCallback, useState } from "react"; | ||
import { | ||
DialogStep, | ||
StepperDialog, | ||
StepperDialogClassNames, | ||
} from "@axiscommunications/fluent-stepper"; | ||
import { makeStyles } from "@fluentui/react-components"; | ||
|
||
const useOverrideStyles = makeStyles({ | ||
root: { | ||
// use StepperDialogClassNames template string to see all selectors | ||
[`> * .${StepperDialogClassNames.previous}`]: { | ||
display: "none", | ||
}, | ||
}, | ||
}); | ||
|
||
const steps: DialogStep[] = [ | ||
{ | ||
name: "First step", | ||
content: <>{"This is the content of the first step. ".repeat(20)}</>, | ||
}, | ||
{ | ||
name: "Second step", | ||
content: <>{"This is the content of the second step. ".repeat(20)}</>, | ||
}, | ||
{ | ||
name: "Third step", | ||
content: <>{"This is the content of the third step. ".repeat(20)}</>, | ||
}, | ||
]; | ||
|
||
export function CustomStepperDialogExample() { | ||
const [step, setStep] = useState(0); | ||
const onFinish = useCallback(() => alert("Finish!"), []); | ||
const onCancel = useCallback(() => setStep(0), []); | ||
|
||
const overrideStyles = useOverrideStyles(); | ||
|
||
return ( | ||
<StepperDialog | ||
className={overrideStyles.root} | ||
currentStep={step} | ||
steps={steps} | ||
disableProgression={false} | ||
onStepChange={setStep} | ||
onFinish={onFinish} | ||
onCancel={onCancel} | ||
cancelLabel="Cancel" | ||
nextLabel="Next" | ||
previousLabel="Previous" | ||
finishLabel="Finish" | ||
/> | ||
); | ||
} | ||
|
||
export const CustomStepperDialogExampleAsString = ` | ||
import React, { useCallback, useState } from "react"; | ||
import { DialogStep, StepperDialog, StepperDialogClassNames } from "@axiscommunications/fluent-stepper"; | ||
import { makeStyles } from "@fluentui/react-components"; | ||
const useOverrideStyles = makeStyles({ | ||
root: { | ||
// use StepperDialogClassNames template string to see all selectors | ||
[> * .${StepperDialogClassNames.previous}]: { | ||
display: "none", | ||
}, | ||
}, | ||
}) | ||
const steps: DialogStep[] = [ | ||
{ | ||
name: "First step", | ||
content: <>{"This is the content of the first step. ".repeat(20)}</>, | ||
}, | ||
{ | ||
name: "Second step", | ||
content: <>{"This is the content of the second step. ".repeat(20)}</>, | ||
}, | ||
{ | ||
name: "Third step", | ||
content: <>{"This is the content of the third step. ".repeat(20)}</>, | ||
}, | ||
]; | ||
export function CustomStepperDialogExample() { | ||
const [step, setStep] = useState(0); | ||
const onFinish = useCallback(() => alert("Finish!"), []); | ||
const onCancel = useCallback(() => setStep(0), []); | ||
const overrideStyles = useOverrideStyles() | ||
return ( | ||
<StepperDialog | ||
className={overrideStyles.root} | ||
currentStep={step} | ||
steps={steps} | ||
disableProgression={false} | ||
onStepChange={setStep} | ||
onFinish={onFinish} | ||
onCancel={onCancel} | ||
cancelLabel="Cancel" | ||
nextLabel="Next" | ||
previousLabel="Previous" | ||
finishLabel="Finish" | ||
/> | ||
); | ||
} | ||
`; |
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
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
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
Oops, something went wrong.