From f1b6bf9f9e0c141b876496bb830ab74808f4b850 Mon Sep 17 00:00:00 2001 From: Craig Howell Date: Tue, 18 Oct 2022 14:55:46 -0400 Subject: [PATCH] fix(Divider): removed dependency on material icons docs(divider): updated examples --- src/lib/components/divider/Icon.svelte | 44 ++++++++++++++++++----- src/routes/divider/+page.svelte | 4 ++- src/routes/divider/examples.ts | 50 ++++++++++++++++++++++++-- 3 files changed, 85 insertions(+), 13 deletions(-) diff --git a/src/lib/components/divider/Icon.svelte b/src/lib/components/divider/Icon.svelte index fb2dda56..28e65df1 100644 --- a/src/lib/components/divider/Icon.svelte +++ b/src/lib/components/divider/Icon.svelte @@ -1,5 +1,4 @@ -{icon} + + + {@html elements} + + diff --git a/src/routes/divider/+page.svelte b/src/routes/divider/+page.svelte index b1792597..7213d04a 100644 --- a/src/routes/divider/+page.svelte +++ b/src/routes/divider/+page.svelte @@ -2,6 +2,8 @@ import { Button, Card, Col, Divider } from '../../lib'; import { example, props, slots, iconProps, labelSlots } from './examples'; import { PropsTable, SlotsTable, CodeBlock } from '../../docs'; + + import { plus_circle } from '../../docs/icons'; @@ -11,7 +13,7 @@

Divider

- + Divider diff --git a/src/routes/divider/examples.ts b/src/routes/divider/examples.ts index 449ce733..c4dc7f54 100644 --- a/src/routes/divider/examples.ts +++ b/src/routes/divider/examples.ts @@ -30,9 +30,51 @@ export const slots: Slot[] = [ export const iconProps: Prop[] = [ { id: '1', - prop: 'icon', - type: 'MaterialIcon', + prop: 'data', + type: 'string (IconData)', default: '' + }, + { + id: '2', + prop: 'viewBox', + type: 'string', + default: '0 0 24 24' + }, + { + id: '3', + prop: 'size', + type: 'string', + default: '24px' + }, + { + id: '4', + prop: 'width', + type: 'string', + default: '24px' + }, + { + id: '5', + prop: 'height', + type: 'string', + default: '24px' + }, + { + id: '6', + prop: 'color', + type: 'string', + default: 'currentColor' + }, + { + id: '7', + prop: 'stroke', + type: 'string | undefined', + default: '' + }, + { + id: '8', + prop: 'fill', + type: 'string', + default: 'currentColor' } ]; @@ -47,6 +89,8 @@ export const labelSlots: Slot[] = [ export const example = ` @@ -55,7 +99,7 @@ export const example = ` - + Divider