Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
36 changes: 36 additions & 0 deletions components/doc/stepper/theming/unstyleddoc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { DocSectionCode } from '@/components/doc/common/docsectioncode';
import { DocSectionText } from '@/components/doc/common/docsectiontext';

export const UnstyledDoc = (props) => {
const code = {
basic: `
<Stepper ref={stepperRef}>
<StepperPanel header="Step 1">
<p>Content of Step 1</p>
<Button label="Next" onClick={() => stepperRef.current.nextCallback()} />
</StepperPanel>
<StepperPanel header="Step 2">
<p>Content of Step 2</p>
<Button label="Back" onClick={() => stepperRef.current.prevCallback()} className="mr-2" />
<Button label="Next" onClick={() => stepperRef.current.nextCallback()} />
</StepperPanel>
<StepperPanel header="Step 3">
<p>Content of Step 3</p>
<Button label="Back" onClick={() => stepperRef.current.prevCallback()} />
</StepperPanel>
</Stepper>
`
};

return (
<>
<DocSectionText {...props}>
<p>
Theming is implemented with <strong>pass-through properties</strong> in unstyled mode.
This allows you to apply your own styling or integrate with Tailwind.
</p>
</DocSectionText>
<DocSectionCode code={code} hideToggleCode import hideStackBlitz />
</>
);
};
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 7 additions & 8 deletions pages/stepper/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { ImportDoc } from '@/components/doc/stepper/importdoc';
import { LinearDoc } from '@/components/doc/stepper/lineardoc';
import { Wireframe } from '@/components/doc/stepper/pt/wireframe';
import { StyledDoc } from '@/components/doc/stepper/theming/styleddoc';
import { UnstyledDoc } from '@/components/doc/stepper/theming/unstyleddoc';
import { TailwindDoc } from '@/components/doc/stepper/theming/tailwinddoc';
import { VerticalDoc } from '@/components/doc/stepper/verticaldoc';
import { HeaderDoc } from '@/components/doc/stepper/headerdoc';
Expand Down Expand Up @@ -70,14 +71,12 @@ const StepperDemo = () => {
{
id: 'unstyled',
label: 'Unstyled',
description: 'Theming is implemented with the pass through properties in unstyled mode.',
children: [
{
id: 'tailwind',
label: 'Tailwind',
component: TailwindDoc
}
]
component: UnstyledDoc
},
{
id: 'tailwind',
label: 'Tailwind',
component: TailwindDoc
}
];

Expand Down
Loading