Skip to content

Commit

Permalink
feat: add variant and weight props to DBIcon (#2052)
Browse files Browse the repository at this point in the history
  • Loading branch information
nmerget authored Jan 9, 2024
1 parent 40229df commit b463be6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
10 changes: 9 additions & 1 deletion packages/components/src/components/icon/icon.lite.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
import {onMount, Show, useMetadata, useRef, useStore} from '@builder.io/mitosis';
import {
onMount,
Show,
useMetadata,
useRef,
useStore
} from '@builder.io/mitosis';
import type { DBIconState, DBIconProps } from './model';
import { cls } from '../../utils';

Expand All @@ -24,6 +30,8 @@ export default function DBIcon(props: DBIconProps) {
id={props.id}
class={cls('db-icon', props.className)}
data-icon={props.icon}
data-icon-weight={props.weight}
data-icon-variant={props.variant}
aria-hidden="true"
title={props.title}>
<Show when={state.stylePath}>
Expand Down
5 changes: 4 additions & 1 deletion packages/components/src/components/icon/model.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { GlobalProps, GlobalState, IconProps } from '../../shared/model';

export type DBIconDefaultProps = {};
export type DBIconDefaultProps = {
variant?: 'default' | 'inverted' | 'solid';
weight?: '16' | '20' | '24' | '32' | '48' | '64';
};

export type DBIconProps = DBIconDefaultProps & GlobalProps & IconProps;

Expand Down

0 comments on commit b463be6

Please sign in to comment.