Skip to content

Commit

Permalink
docs(Toggle): added class identifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
N00nDay committed Oct 5, 2023
1 parent 46bec1b commit 70cf638
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/routes/toggle/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
descriptionSlots,
contentLeftSlots,
contentRightSlots,
usage
usage,
classList
} from './examples';
import { PropsTable, SlotsTable, CodeBlock, ExampleContainer } from '../../docs';
import { PropsTable, SlotsTable, ClassTable, CodeBlock, ExampleContainer } from '../../docs';
import { brightness_4, brightness_5 } from '../../docs/icons';
let on = false;
Expand Down Expand Up @@ -120,3 +121,5 @@
<SlotsTable component="Toggle.ContentRight.Title" slots={titleSlots} />

<SlotsTable component="Toggle.ContentRight.Description" slots={descriptionSlots} />

<ClassTable component="Toggle" {classList} />
45 changes: 44 additions & 1 deletion src/routes/toggle/examples.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Slot, Prop } from '../../docs';
import type { Slot, Prop, IClass } from '../../docs';

export const props: Prop[] = [
{
Expand Down Expand Up @@ -137,6 +137,49 @@ export const descriptionSlots: Slot[] = [
}
];

export const classList: IClass[] = [
{
id: '1',
class: 'stwui-toggle-wrapper'
},
{
id: '2',
class: 'stwui-toggle'
},
{
id: '3',
class: 'stwui-toggle-dongle'
},
{
id: '4',
class: 'stwui-toggle-left-icon-wrapper'
},
{
id: '5',
class: 'stwui-toggle-right-icon-wrapper'
},
{
id: '6',
class: 'stwui-toggle-error'
},
{
id: '7',
class: 'stwui-toggle-label'
},
{
id: '8',
class: 'stwui-toggle-content-left'
},
{
id: '9',
class: 'stwui-toggle-content-right'
},
{
id: '10',
class: 'stwui-toggle-description'
}
];

export const usage = `
import { Toggle } from 'stwui';
// OR
Expand Down

0 comments on commit 70cf638

Please sign in to comment.